Commit ecc2d430 authored by Wei Yongjun's avatar Wei Yongjun Committed by Alexandre Belloni

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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 1001354c
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment