]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pinctrl: single: Fix incorrect type for error return variable
authorHaotian Zhang <vulab@iscas.ac.cn>
Wed, 3 Dec 2025 06:13:47 +0000 (14:13 +0800)
committerLinus Walleij <linusw@kernel.org>
Wed, 3 Dec 2025 23:19:37 +0000 (00:19 +0100)
commit61d1bb53547d42c6bdaec9da4496beb3a1a05264
tree7aa45986243b998f698f8d976ff497e58b57a948
parentac52b4a98509de3760919fa33e03384a5e770d7a
pinctrl: single: Fix incorrect type for error return variable

pcs_pinconf_get() and pcs_pinconf_set() declare ret as unsigned int,
but assign it the return values of pcs_get_function() that may return
negative error codes. This causes negative error codes to be
converted to large positive values.

Change ret from unsigned int to int in both functions.

Fixes: 9dddb4df90d1 ("pinctrl: single: support generic pinconf")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/pinctrl-single.c