]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:32 +0000 (14:03 +0100)
commitb9ceff1ca3ef9a3f7438e0825b6095da3905fc4c
tree99761464a125e30966fee936be7ec3329e36e13f
parent654841dd211b006803a5f8a4005f03010e0fdbdc
pinctrl: single: Fix incorrect type for error return variable

[ Upstream commit 61d1bb53547d42c6bdaec9da4496beb3a1a05264 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/pinctrl-single.c