* [PATCH] bcm590xx: correctly handle return value of i2c_new_dummy()
@ 2016-02-16 2:35 Insu Yun
0 siblings, 0 replies; only message in thread
From: Insu Yun @ 2016-02-16 2:35 UTC (permalink / raw)
To: lee.jones, linux-kernel; +Cc: taesoo, yeongjin.jang, insu, changwoo, Insu Yun
i2c_new_dummy() returns NULL when failed, not an error code.
Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
drivers/mfd/bcm590xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/bcm590xx.c b/drivers/mfd/bcm590xx.c
index 320aaef..7aaf622 100644
--- a/drivers/mfd/bcm590xx.c
+++ b/drivers/mfd/bcm590xx.c
@@ -67,7 +67,7 @@ static int bcm590xx_i2c_probe(struct i2c_client *i2c_pri,
/* Secondary I2C slave address is the base address with A(2) asserted */
bcm590xx->i2c_sec = i2c_new_dummy(i2c_pri->adapter,
i2c_pri->addr | BIT(2));
- if (IS_ERR_OR_NULL(bcm590xx->i2c_sec)) {
+ if (!bcm590xx->i2c_sec) {
dev_err(&i2c_pri->dev, "failed to add secondary I2C device\n");
return -ENODEV;
}
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-16 2:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16 2:35 [PATCH] bcm590xx: correctly handle return value of i2c_new_dummy() Insu Yun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®