summaryrefslogtreecommitdiffstats
path: root/drivers/mci
diff options
context:
space:
mode:
authorWadim Egorov <w.egorov@phytec.de>2015-03-18 15:13:42 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-19 07:52:24 +0100
commitf28ea921819c6cc8bdd68614c5762c8afddbda58 (patch)
tree85d0a59a831fb0595932c29eedfb6cdaf5146fce /drivers/mci
parentccee789e67127ff21f6e58184bcbd01ce9546014 (diff)
downloadbarebox-f28ea921819c6cc8bdd68614c5762c8afddbda58.tar.gz
barebox-f28ea921819c6cc8bdd68614c5762c8afddbda58.tar.xz
mci: core: Check return value of dev_add_param_bool
Commit 03b59bdb64e83ebcdb9111681775117ebce0e03b changed the return values of dev_add_param_* to ERR_PTR(-ENOSYS) and broke a few boards. We have now to care about the return value of dev_add_param_bool() in mci_register(). Also set the ret variable when dev_add_param_bool() fails. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci')
-rw-r--r--drivers/mci/mci-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 8221632ecb..bd5cae2cea 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1774,7 +1774,8 @@ int mci_register(struct mci_host *host)
mci->param_probe = dev_add_param_bool(&mci->dev, "probe",
mci_set_probe, NULL, &mci->probe, mci);
- if (IS_ERR(mci->param_probe)) {
+ if (IS_ERR(mci->param_probe) && PTR_ERR(mci->param_probe) != -ENOSYS) {
+ ret = PTR_ERR(mci->param_probe);
dev_dbg(&mci->dev, "Failed to add 'probe' parameter to the MCI device\n");
goto err_unregister;
}