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] [thread-next>] [day] [month] [year] [list]
Date: Mon, 19 Feb 2024 08:27:43 +0100
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Thorsten Scherer <T.Scherer@...elmann.de>
Cc: Raag Jadav <raag.jadav@...el.com>, jarkko.nikula@...ux.intel.com, 
	mika.westerberg@...ux.intel.com, andriy.shevchenko@...ux.intel.com, lakshmi.sowjanya.d@...el.com, 
	linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/4] pwm: dwc: drop redundant error check

Hello,

On Mon, Feb 19, 2024 at 08:11:00AM +0100, Thorsten Scherer wrote:
> On Mon, Feb 19, 2024 at 09:08:33AM +0530, Raag Jadav wrote:
> > pcim_iomap_table() fails only if pcim_iomap_regions() fails. No need to
> > check for failure if the latter is already successful.
> > 
> > Suggested-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > Signed-off-by: Raag Jadav <raag.jadav@...el.com>
> > Tested-by: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
> > ---
> >  drivers/pwm/pwm-dwc.c | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> > 
> > diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c
> > index c0e586688e57..7dbb72c80ef5 100644
> > --- a/drivers/pwm/pwm-dwc.c
> > +++ b/drivers/pwm/pwm-dwc.c
> > @@ -51,11 +51,8 @@ static int dwc_pwm_probe(struct pci_dev *pci, const struct pci_device_id *id)
> >  		return ret;
> >  	}
> >  
> > +	/* No need to check for failure, pcim_iomap_regions() does it for us. */
> 
> IMHO this comment could be omitted.

I like the comment (and even asked for it). Is it really only me who
doesn't know that after pcim_iomap_regions() calling pcim_iomap_table()
is unproblematic?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ