Skip to contentSkip to conversation

memory: atmel-ebi: fix return value check in at91_ebi_dev_disable()

PATCH Applied Wei Yongjun 2 participants 2 messages Sep 16, 2016 – Oct 20, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memory: atmel-ebi: fix return value check in at91_ebi_dev_disable()

From: Wei Yongjun <[email protected]>

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

---
 drivers/memory/atmel-ebi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/memory/atmel-ebi.c +1 -1
index b5ed3bd..047d6fc 100644
@@ -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");
#1 lore raw
Quoted 10 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

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

---
 drivers/memory/atmel-ebi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Signature · 3 lines
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com