diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2014-12-02 20:27:56 (GMT) |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-12-02 21:49:11 (GMT) |
commit | 18159624d85f260bdb19d79eb78d58fb17f76181 (patch) | |
tree | 87111398259e58896fd4235a7e8c8354913fa2e0 /drivers/nfc | |
parent | 67df3f9509b15fc29ba8c110b25f4913efa318d4 (diff) | |
download | linux-18159624d85f260bdb19d79eb78d58fb17f76181.tar.xz |
NFC: st21nfcb: Fix reported error
Report error returned by devm_gpio_request_one 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/st21nfcb/i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nfc/st21nfcb/i2c.c b/drivers/nfc/st21nfcb/i2c.c index 363c2fc..01ba865 100644 --- a/drivers/nfc/st21nfcb/i2c.c +++ b/drivers/nfc/st21nfcb/i2c.c @@ -255,7 +255,7 @@ static int st21nfcb_nci_i2c_of_request_resources(struct i2c_client *client) GPIOF_OUT_INIT_HIGH, "clf_reset"); if (r) { nfc_err(&client->dev, "Failed to request reset pin\n"); - return -ENODEV; + return r; } phy->gpio_reset = gpio; @@ -290,7 +290,7 @@ static int st21nfcb_nci_i2c_request_resources(struct i2c_client *client) phy->gpio_reset, GPIOF_OUT_INIT_HIGH, "clf_reset"); if (r) { pr_err("%s : reset gpio_request failed\n", __FILE__); - return -ENODEV; + return r; } return 0; |