aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/iio/light/tsl2x7x_core.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c
index d060f2572512..c99f890cc6c6 100644
--- a/drivers/staging/iio/light/tsl2x7x_core.c
+++ b/drivers/staging/iio/light/tsl2x7x_core.c
@@ -1869,6 +1869,7 @@ static int tsl2x7x_probe(struct i2c_client *clientp,
1869 dev_info(&chip->client->dev, 1869 dev_info(&chip->client->dev,
1870 "%s: i2c device found does not match expected id\n", 1870 "%s: i2c device found does not match expected id\n",
1871 __func__); 1871 __func__);
1872 ret = -EINVAL;
1872 goto fail1; 1873 goto fail1;
1873 } 1874 }
1874 1875
@@ -1907,7 +1908,7 @@ static int tsl2x7x_probe(struct i2c_client *clientp,
1907 if (ret) { 1908 if (ret) {
1908 dev_err(&clientp->dev, 1909 dev_err(&clientp->dev,
1909 "%s: irq request failed", __func__); 1910 "%s: irq request failed", __func__);
1910 goto fail2; 1911 goto fail1;
1911 } 1912 }
1912 } 1913 }
1913 1914
@@ -1920,17 +1921,17 @@ static int tsl2x7x_probe(struct i2c_client *clientp,
1920 if (ret) { 1921 if (ret) {
1921 dev_err(&clientp->dev, 1922 dev_err(&clientp->dev,
1922 "%s: iio registration failed\n", __func__); 1923 "%s: iio registration failed\n", __func__);
1923 goto fail1; 1924 goto fail2;
1924 } 1925 }
1925 1926
1926 dev_info(&clientp->dev, "%s Light sensor found.\n", id->name); 1927 dev_info(&clientp->dev, "%s Light sensor found.\n", id->name);
1927 1928
1928 return 0; 1929 return 0;
1929 1930
1930fail1: 1931fail2:
1931 if (clientp->irq) 1932 if (clientp->irq)
1932 free_irq(clientp->irq, indio_dev); 1933 free_irq(clientp->irq, indio_dev);
1933fail2: 1934fail1:
1934 iio_device_free(indio_dev); 1935 iio_device_free(indio_dev);
1935 1936
1936 return ret; 1937 return ret;