]> www.infradead.org Git - users/hch/misc.git/commit
pinctrl: qcom: tlmm-test: Fix potential null dereference in tlmm kunit test
authorCharles Han <hanchunchao@inspur.com>
Tue, 25 Mar 2025 09:49:32 +0000 (17:49 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 15 Apr 2025 07:23:07 +0000 (09:23 +0200)
commit1938be9fbad1bd87a1dcd9c3ca88e454565f0609
treec602bc26b90b03560d7e1973a9ce793e0720e23d
parent3ede3f8b4b4b399b0ca41e44959f80d5cf84fc98
pinctrl: qcom: tlmm-test: Fix potential null dereference in tlmm kunit test

kunit_kzalloc() may return a NULL pointer, dereferencing it without
NULL check may lead to NULL dereference.
Add a NULL check for grp.

Fixes: c7984dc0a2b9 ("pinctrl: qcom: Add test case for TLMM interrupt handling")
Signed-off-by: Charles Han <hanchunchao@inspur.com>
Link: https://lore.kernel.org/20250325094932.4733-1-hanchunchao@inspur.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/tlmm-test.c