From: Wei Yongjun Date: Fri, 16 Sep 2016 13:03:47 +0000 (+0000) Subject: memory: atmel-ebi: fix return value check in at91_ebi_dev_disable() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ecc2d430fadfba408b1d453d82128a696fa73fe0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git memory: atmel-ebi: fix return value check in at91_ebi_dev_disable() Fix the retrn value check which testing the wrong variable in at91_ebi_dev_disable(). Signed-off-by: Wei Yongjun Signed-off-by: Alexandre Belloni --- diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c index b5ed3bd082b5..047d6fcdcec2 100644 --- a/drivers/memory/atmel-ebi.c +++ b/drivers/memory/atmel-ebi.c @@ -657,7 +657,7 @@ static int at91_ebi_dev_disable(struct at91_ebi *ebi, struct device_node *np) return -ENOMEM; newprop->value = devm_kstrdup(dev, "disabled", GFP_KERNEL); - if (!newprop->name) + if (!newprop->value) return -ENOMEM; newprop->length = sizeof("disabled");