Skip to content
Commit 05214b06 authored by Colin Ian King's avatar Colin Ian King Committed by Linus Walleij
Browse files

pinctrl: th1520: Fix potential null pointer dereference on func



The initialization of muxtype deferences pointer func before func
is sanity checked with a null pointer check, hence we have a null
pointer deference issue. Fix this by only deferencing func with
the assignment to muxtype after func has been null pointer checked.

Fixes: 1fc30cd9 ("pinctrl: th1520: Factor out casts")
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Reported-by: default avatarKees Bakker <kees@ijzerbout.nl>
Acked-by: default avatarDrew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20241016155655.334518-1-colin.i.king@gmail.com


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