Skip to content

Commit

Permalink
memory: atmel-ebi: fix return value check in at91_ebi_dev_disable()
Browse files Browse the repository at this point in the history
Fix the retrn value check which testing the wrong variable
in at91_ebi_dev_disable().

Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
  • Loading branch information
Wei Yongjun authored and alexandrebelloni committed Oct 20, 2016
1 parent 1001354 commit ecc2d43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/memory/atmel-ebi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit ecc2d43

Please sign in to comment.