summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2014-12-02 21:27:55 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2014-12-02 22:48:32 +0100
commit67df3f9509b15fc29ba8c110b25f4913efa318d4 (patch)
tree7df33ed33034072987be22ea946cef1eb5c3edff /drivers/nfc
parentb3a55b9c5d44d0ed38eb6e8593a47578801730de (diff)
downloadlinux-67df3f9509b15fc29ba8c110b25f4913efa318d4.tar.bz2
NFC: st21nfca: Report error returned by functions instead of -ENODEV
Report error returned by devm_gpio_request_one or st21nfca_hci_platform_init instead of -ENODEV. Reported-by: Dmitry Torokhov <dtor@chromium.org> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/st21nfca/i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index 44e1c769e335..05722085a59f 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -530,7 +530,7 @@ static int st21nfca_hci_i2c_of_request_resources(struct i2c_client *client)
"clf_enable");
if (r) {
nfc_err(&client->dev, "Failed to request enable pin\n");
- return -ENODEV;
+ return r;
}
phy->gpio_ena = gpio;
@@ -567,7 +567,7 @@ static int st21nfca_hci_i2c_request_resources(struct i2c_client *client)
GPIOF_OUT_INIT_HIGH, "clf_enable");
if (r) {
pr_err("%s : ena gpio_request failed\n", __FILE__);
- return -ENODEV;
+ return r;
}
}
@@ -628,7 +628,7 @@ static int st21nfca_hci_i2c_probe(struct i2c_client *client,
r = st21nfca_hci_platform_init(phy);
if (r < 0) {
nfc_err(&client->dev, "Unable to reboot st21nfca\n");
- return -ENODEV;
+ return r;
}
r = devm_request_threaded_irq(&client->dev, client->irq, NULL,