Re: [PATCH 179/190] Revert "drivers/regulator: fix a missing check of return value"

Greg Kroah-Hartman
2021-04-27T16:59:46Z

On Wed, Apr 21, 2021 at 03:00:54PM +0200, Greg Kroah-Hartman wrote:
> This reverts commit 966e927bf8cc6a44f8b72582a1d6d3ffc73b12ad.
>
> Commits from @umn.edu addresses have been found to be submitted in "bad
> faith" to try to test the kernel community's ability to review "known
> malicious" changes. The result of these submissions can be found in a
> paper published at the 42nd IEEE Symposium on Security and Privacy
> entitled, "Open Source Insecurity: Stealthily Introducing
> Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University
> of Minnesota) and Kangjie Lu (University of Minnesota).
>
> Because of this, all submissions from this group must be reverted from
> the kernel tree and will need to be re-reviewed again to determine if
> they actually are a valid fix. Until that work is complete, remove this
> change to ensure that no problems are being introduced into the
> codebase.
>
> Cc: Kangjie Lu <kjlu@umn.edu>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/regulator/palmas-regulator.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
> index 337dd614695e..f27ad8254291 100644
> --- a/drivers/regulator/palmas-regulator.c
> +++ b/drivers/regulator/palmas-regulator.c
> @@ -438,16 +438,13 @@ static int palmas_ldo_write(struct palmas *palmas, unsigned int reg,
> static int palmas_set_mode_smps(struct regulator_dev *dev, unsigned int mode)
> {
> int id = rdev_get_id(dev);
> - int ret;
> struct palmas_pmic *pmic = rdev_get_drvdata(dev);
> struct palmas_pmic_driver_data *ddata = pmic->palmas->pmic_ddata;
> struct palmas_regs_info *rinfo = &ddata->palmas_regs_info[id];
> unsigned int reg;
> bool rail_enable = true;
>
> - ret = palmas_smps_read(pmic->palmas, rinfo->ctrl_addr, &reg);
> - if (ret)
> - return ret;
> + palmas_smps_read(pmic->palmas, rinfo->ctrl_addr, &reg);
>
> reg &= ~PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK;
>
> --
> 2.31.1
>

Original looks correct, dropping.

greg k-h