Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 794550ff authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Lee Jones
Browse files

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 51a6c60b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}