diff options
author | Dejin Zheng <zhengdejin5@gmail.com> | 2020-04-16 17:23:45 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2020-04-18 23:42:14 +0200 |
commit | e42688ed5cf5936fb55c78cc365dbe0944af7c63 (patch) | |
tree | 7494859c73c0ec0b849ed47ae615860c882b2c66 /drivers/i2c/busses/i2c-cht-wc.c | |
parent | i2c: Add Qualcomm CCI I2C driver (diff) | |
download | linux-e42688ed5cf5936fb55c78cc365dbe0944af7c63.tar.xz linux-e42688ed5cf5936fb55c78cc365dbe0944af7c63.zip |
i2c: busses: remove duplicate dev_err()
it will print an error message by itself when platform_get_irq()
goes wrong. so don't need dev_err() in here again.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Suggested-by: Markus Elfring <Markus.Elfring@web.de>
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-cht-wc.c')
-rw-r--r-- | drivers/i2c/busses/i2c-cht-wc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c index 35e55feda763..f80d79e973cd 100644 --- a/drivers/i2c/busses/i2c-cht-wc.c +++ b/drivers/i2c/busses/i2c-cht-wc.c @@ -314,10 +314,8 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev) int ret, reg, irq; irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "Error missing irq resource\n"); - return -EINVAL; - } + if (irq < 0) + return irq; adap = devm_kzalloc(&pdev->dev, sizeof(*adap), GFP_KERNEL); if (!adap) |