[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-omap
Subject:    Re: [PATCH 10/14] media: wl128x-radio: simplify fmc_prepare/fmc_release
From:       Pavel Machek <pavel () ucw ! cz>
Date:       2018-12-22 19:29:34
Message-ID: 20181222192934.GA15237 () amd
[Download RAW message or body]


On Fri 2018-12-21 02:17:48, Sebastian Reichel wrote:
> From: Sebastian Reichel <sebastian.reichel@collabora.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...?

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...

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic