[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4239fc37-c1d4-23e5-c784-b171eb6173ab@ti.com>
Date: Tue, 6 Oct 2020 12:23:06 -0500
From: Dan Murphy <dmurphy@...com>
To: Colin King <colin.king@...onical.com>,
Sebastian Reichel <sre@...nel.org>, <linux-pm@...r.kernel.org>
CC: <kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] power: supply: bq25980: remove redundant zero check
on ret
Colin
On 10/6/20 12:06 PM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Currently ret is assigned to zero and the following statement checks
> if it is non-zero. This check is redundant and can be removed
>
> Addresses-Coverity: ("Logically dead code")
> Fixes: 5069185fc18e ("power: supply: bq25980: Add support for the BQ259xx family")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> drivers/power/supply/bq25980_charger.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/power/supply/bq25980_charger.c b/drivers/power/supply/bq25980_charger.c
> index 3995fb7cf060..f04f9acdb13b 100644
> --- a/drivers/power/supply/bq25980_charger.c
> +++ b/drivers/power/supply/bq25980_charger.c
> @@ -613,9 +613,6 @@ static int bq25980_set_battery_property(struct power_supply *psy,
> struct bq25980_device *bq = power_supply_get_drvdata(psy);
> int ret = 0;
>
> - if (ret)
> - return ret;
> -
> switch (psp) {
> case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT:
> ret = bq25980_set_const_charge_curr(bq, val->intval);
Thanks for the patch
Acked-by: Dan Murphy <dmurphy@...com>
Powered by blists - more mailing lists