diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 0d6b975616bb..9c4c668f9a88 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -1423,7 +1423,7 @@ static struct emif_data *__init_or_module get_device_details( temp = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); dev_info = devm_kzalloc(dev, sizeof(*dev_info), GFP_KERNEL); - if (!emif || !pd || !dev_info) { + if (!emif || !temp || !dev_info) { dev_err(dev, "%s:%d: allocation error\n", __func__, __LINE__); goto error; }