mmc: gen_atmel_mci: NULL check variable before use
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Tue, 29 Jul 2025 16:16:17 +0000 (17:16 +0100)
committerEugen Hristev <eugen.hristev@linaro.org>
Wed, 13 Aug 2025 09:59:36 +0000 (12:59 +0300)
commitc1168f99387b40f5e3323ff16c670427c2c8a66e
tree674bb210c1e1f952614eacce2285d2bc641b3ef4
parent4fb189a58eacd8bac267f2f330b41e7700bcfa12
mmc: gen_atmel_mci: NULL check variable before use

In mci_send_cmd the pointer 'data' is optional so guard its use with a
NULL check to prevent any attempt to dereference it when not provided.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/gen_atmel_mci.c