lkml.org 
[lkml]   [2014]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] watchdog: ts72xx_wdt: Kill superfluous variable in remove
On Tue, Aug 19, 2014 at 07:59:16AM -0700, Guenter Roeck wrote:
> On Tue, Aug 19, 2014 at 02:57:12PM +0300, Mika Westerberg wrote:
> > There is no need to store the return value of misc_deregister() in a
> > variable. Instead we can just return the value directly.
> >
> > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> > ---
> > drivers/watchdog/ts72xx_wdt.c | 6 +-----
> > 1 file changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c
> > index afa9d6ef353a..dee9c6cbe6df 100644
> > --- a/drivers/watchdog/ts72xx_wdt.c
> > +++ b/drivers/watchdog/ts72xx_wdt.c
> > @@ -428,11 +428,7 @@ static int ts72xx_wdt_probe(struct platform_device *pdev)
> >
> > static int ts72xx_wdt_remove(struct platform_device *pdev)
> > {
> > - int error;
> > -
> > - error = misc_deregister(&ts72xx_wdt_miscdev);
> > -
> > - return error;
> > + return misc_deregister(&ts72xx_wdt_miscdev);
>
> Is that worth it, and does it even reduce code size ?

Well, it makes that particular function look better.

> Converting the driver to use the watchdog infrastructure would make much more sense
> (if someone can test the result).

I agree that converting makes sense, but that is subject of a separate patch.


\
 
 \ /
  Last update: 2014-08-19 17:41    [W:0.034 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site