mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] memory: atmel-ebi: fix return value check in at91_ebi_dev_disable()
@ 2016-09-16 13:03 Wei Yongjun
  2016-10-20  9:59 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-09-16 13:03 UTC (permalink / raw)
  To: Alexandre Belloni, Boris Brezillon, Paul Gortmaker,
	Nicolas Ferre, Wei Yongjun
  Cc: Wei Yongjun, linux-kernel

From: Wei Yongjun <weiyongjun1@huawei.com>

Fix the retrn value check which testing the wrong variable
in at91_ebi_dev_disable().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/memory/atmel-ebi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index b5ed3bd..047d6fc 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");

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-20  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 13:03 [PATCH -next] memory: atmel-ebi: fix return value check in at91_ebi_dev_disable() Wei Yongjun
2016-10-20  9:59 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®