Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: lm3533: Simplify function return logic

The invoked functions already return zero on success or a negative
errno code so there is no need to open code the logic in the caller.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Javier Martinez Canillas and committed by
Lee Jones
a1c16d71 5597da29

+2 -10
+2 -10
drivers/mfd/lm3533-core.c
··· 472 472 if (ret) 473 473 return ret; 474 474 475 - ret = lm3533_set_boost_ovp(lm3533, pdata->boost_ovp); 476 - if (ret) 477 - return ret; 478 - 479 - return 0; 475 + return lm3533_set_boost_ovp(lm3533, pdata->boost_ovp); 480 476 } 481 477 482 478 static int lm3533_device_init(struct lm3533 *lm3533) ··· 609 613 lm3533->dev = &i2c->dev; 610 614 lm3533->irq = i2c->irq; 611 615 612 - ret = lm3533_device_init(lm3533); 613 - if (ret) 614 - return ret; 615 - 616 - return 0; 616 + return lm3533_device_init(lm3533); 617 617 } 618 618 619 619 static int lm3533_i2c_remove(struct i2c_client *i2c)