Skip to content
Commit bcc48700 authored by Maxim Korotkov's avatar Maxim Korotkov Committed by Greg Kroah-Hartman
Browse files

pinctrl: single: fix potential NULL dereference



[ Upstream commit d2d73e6d ]

Added checking of pointer "function" in pcs_set_mux().
pinmux_generic_get_function() can return NULL and the pointer
"function" was dereferenced without checking against NULL.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 571aec4d ("pinctrl: single: Use generic pinmux helpers for managing functions")
Signed-off-by: default avatarMaxim Korotkov <korotkov.maxim.s@gmail.com>
Reviewed-by: default avatarTony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20221118104332.943-1-korotkov.maxim.s@gmail.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9eab7b05
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment