Skip to content
Commit d2d73e6d authored by Maxim Korotkov's avatar Maxim Korotkov Committed by Linus Walleij
Browse files

pinctrl: single: fix potential NULL dereference

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>
parent c6e0679b
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