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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 9 Jan 2019 19:17:50 +0100
From:   Sebastian Reichel <sre@...nel.org>
To:     Pavel Machek <pavel@....cz>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Marcel Holtmann <marcel@...tmann.org>,
        Tony Lindgren <tony@...mide.com>,
        Rob Herring <robh@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-bluetooth@...r.kernel.org, linux-media@...r.kernel.org,
        linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/14] media: wl128x-radio: simplify
 fmc_prepare/fmc_release

Hi Pavel,

On Sat, Dec 22, 2018 at 08:29:34PM +0100, Pavel Machek wrote:
> On Fri 2018-12-21 02:17:48, Sebastian Reichel wrote:
> > From: Sebastian Reichel <sebastian.reichel@...labora.com>
> > 
> > Remove unused return code from fmc_prepare() and fmc_release() to
> > simplify the code a bit.
> 
> 
> >  /*
> >   * This function will be called from FM V4L2 release function.
> >   * Unregister from ST driver.
> >   */
> > -int fmc_release(struct fmdev *fmdev)
> > +void fmc_release(struct fmdev *fmdev)
> >  {
> >  	static struct st_proto_s fm_st_proto;
> >  	int ret;
> >  
> >  	if (!test_bit(FM_CORE_READY, &fmdev->flag)) {
> >  		fmdbg("FM Core is already down\n");
> > -		return 0;
> > +		return;
> >  	}
> >  	/* Service pending read */
> >  	wake_up_interruptible(&fmdev->rx.rds.read_queue);
> > @@ -1611,7 +1606,6 @@ int fmc_release(struct fmdev *fmdev)
> >  		fmdbg("Successfully unregistered from ST\n");
> >  
> >  	clear_bit(FM_CORE_READY, &fmdev->flag);
> > -	return ret;
> >  }
> 
> 
> You probably leave unused variable (ret) here. I guess that's okay as
> you remove it later in the series...?

It's still being used after this patch (but indeed removed in a
later patch).

> Also... I'd kind of expect _prepare routine to return int. Even if it
> currently does not do anything that could return error, I'd kind of
> expect allocations being done there...

well the driver is basically feature complete and all allocations
happen in probe :)

-- Sebastian

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ