[PATCH] mtd: core: Potential NULL dereference in mtd_otp_size()

Michael Walle michael at walle.cc
Fri May 14 11:35:31 PDT 2021


Am 2021-05-14 16:27, schrieb Dan Carpenter:
> If kmalloc() fails then it could lead to a NULL dereference.  Check and
> return -ENOMEM on error.
> 
> Fixes: 4b361cfa8624 ("mtd: core: add OTP nvmem provider support")
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

Thanks, were was my head..

Reviewed-by: Michael Walle <michael at walle.cc>

-michael



More information about the linux-mtd mailing list