Message ID | 20211213021655.435423-1-chi.minghao@zte.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drivers/regulator: remove redundant ret variable | expand |
On Mon, 13 Dec 2021 02:16:55 +0000, cgel.zte@gmail.com wrote: > From: Minghao Chi <chi.minghao@zte.com.cn> > > Return value from twlreg_write() directly instead > of taking this in another redundant variable. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next Thanks! [1/1] drivers/regulator: remove redundant ret variable commit: c57dbcab04449ec869561a9056d0de1a07cbb863 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 4a51cfea45ac..e2a20d512152 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -196,7 +196,6 @@ static int twl4030reg_enable(struct regulator_dev *rdev) { struct twlreg_info *info = rdev_get_drvdata(rdev); int grp; - int ret; grp = twlreg_grp(rdev); if (grp < 0) @@ -204,16 +203,13 @@ static int twl4030reg_enable(struct regulator_dev *rdev) grp |= P1_GRP_4030; - ret = twlreg_write(info, TWL_MODULE_PM_RECEIVER, VREG_GRP, grp); - - return ret; + return twlreg_write(info, TWL_MODULE_PM_RECEIVER, VREG_GRP, grp); } static int twl4030reg_disable(struct regulator_dev *rdev) { struct twlreg_info *info = rdev_get_drvdata(rdev); int grp; - int ret; grp = twlreg_grp(rdev); if (grp < 0) @@ -221,9 +217,7 @@ static int twl4030reg_disable(struct regulator_dev *rdev) grp &= ~(P1_GRP_4030 | P2_GRP_4030 | P3_GRP_4030); - ret = twlreg_write(info, TWL_MODULE_PM_RECEIVER, VREG_GRP, grp); - - return ret; + return twlreg_write(info, TWL_MODULE_PM_RECEIVER, VREG_GRP, grp); } static int twl4030reg_get_status(struct regulator_dev *rdev)