lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 6 Jul 2021 19:27:54 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Cc:     Colin King <colin.king@...onical.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Lee Jones <lee.jones@...aro.org>, linux-pwm@...r.kernel.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Subject: Re: [PATCH][next] pwm: core: remove redundant assignment to pointer
 pwm

On Tue, Jul 06, 2021 at 05:58:20PM +0200, Uwe Kleine-König wrote:

> [adding Andy and Rafael to Cc:]

Thanks.

> On Tue, Jul 06, 2021 at 04:11:32PM +0100, Colin King wrote:
> > From: Colin Ian King <colin.king@...onical.com>
> > 
> > The pointer pwm is being initialized with a value that is never read and
> > it is being updated later with a new value. The initialization is
> > redundant and can be removed.
> > 
> > Addresses-Coverity: ("Unused value")
> > Signed-off-by: Colin Ian King <colin.king@...onical.com>
> > ---
> >  drivers/pwm/core.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
> > index a28c8639af5b..35e894f4a379 100644
> > --- a/drivers/pwm/core.c
> > +++ b/drivers/pwm/core.c
> > @@ -846,7 +846,7 @@ EXPORT_SYMBOL_GPL(of_pwm_get);
> >   */
> >  static struct pwm_device *acpi_pwm_get(const struct fwnode_handle *fwnode)
> >  {
> > -	struct pwm_device *pwm = ERR_PTR(-ENODEV);
> > +	struct pwm_device *pwm;

I would move it after the next line...

> >  	struct fwnode_reference_args args;

...i.e. here

	struct pwm_device *pwm;

> >  	struct pwm_chip *chip;
> >  	int ret;
> 
> LGTM:
> 
> Acked-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> 
> and if you want:
> 
> Fixes: e5c38ba9f281 ("pwm: core: Reuse fwnode_to_pwmchip() in ACPI case")

With or without above comment addressed,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Thanks for spotting and fixing this!

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ