]> git.karo-electronics.de Git - linux-beck.git/commitdiff
NFC: st21nfcb: Fix reported error
authorChristophe Ricard <christophe.ricard@gmail.com>
Tue, 2 Dec 2014 20:27:56 +0000 (21:27 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 2 Dec 2014 21:49:11 +0000 (22:49 +0100)
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>
drivers/nfc/st21nfcb/i2c.c

index 363c2fc6f816f6e20aca908c08a7eb60d150aa23..01ba865863ee93dfb6843ae26d182efa288b6284 100644 (file)
@@ -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;