summary refs log tree commit diff
path: root/drivers/spi
diff options
context:
space:
mode:
authorMaxim Korotkov <korotkov.maxim.s@gmail.com>2022-11-18 13:43:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-14 19:11:50 +0100
commitbcc487001a15f71f103d102cba4ac8145d7a68f2 (patch)
treeac9b22b595c12d6e18708f96f0a1c877412895a4 /drivers/spi
parent9eab7b053947add8f9d6dcd78800b4db9adf66a9 (diff)
downloadlinux-bcc487001a15f71f103d102cba4ac8145d7a68f2.tar.gz
pinctrl: single: fix potential NULL dereference
[ Upstream commit d2d73e6d4822140445ad4a7b1c6091e0f5fe703b ]

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: 571aec4df5b7 ("pinctrl: single: Use generic pinmux helpers for managing functions")
Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20221118104332.943-1-korotkov.maxim.s@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/spi')
0 files changed, 0 insertions, 0 deletions