summaryrefslogtreecommitdiff
path: root/drivers/mfd/bcm590xx.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2016-11-01 09:49:05 +0300
committerLee Jones <lee.jones@linaro.org>2016-11-29 11:21:33 +0300
commit794550ffbf9134f8357b3035b8784f4ead6001d6 (patch)
tree4a93ab332383da0615082f809f7ed7cb1eff85e1 /drivers/mfd/bcm590xx.c
parent51a6c60b2f4d96e6954b620e84d5d9dc7ddc4103 (diff)
downloadlinux-794550ffbf9134f8357b3035b8784f4ead6001d6.tar.xz
mfd: bcm590xx: Simplify a test
'i2c_new_dummy()' does not return an error pointer, so the test can be simplified to be more consistent. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/bcm590xx.c')
-rw-r--r--drivers/mfd/bcm590xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/bcm590xx.c b/drivers/mfd/bcm590xx.c
index 0d76d690176b..c572a35a9341 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;
}