staging: fbtft: remove unused variable
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Fri, 27 Feb 2015 13:10:30 +0000 (15:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 00:57:36 +0000 (16:57 -0800)
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.

The issue was detected and resolved using the following
coccinelle script:

@@
identifier len,f;
@@

-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-core.c

index ac4287f9d6b80e7a0946feb2e049ae7333021f8f..8ca45110cfbe90d9b4ba6af2e69761913b3eba1d 100644 (file)
@@ -1046,7 +1046,6 @@ int fbtft_unregister_framebuffer(struct fb_info *fb_info)
 {
        struct fbtft_par *par = fb_info->par;
        struct spi_device *spi = par->spi;
-       int ret;
 
        if (spi)
                spi_set_drvdata(spi, NULL);
@@ -1055,8 +1054,7 @@ int fbtft_unregister_framebuffer(struct fb_info *fb_info)
        if (par->fbtftops.unregister_backlight)
                par->fbtftops.unregister_backlight(par);
        fbtft_sysfs_exit(par);
-       ret = unregister_framebuffer(fb_info);
-       return ret;
+       return unregister_framebuffer(fb_info);
 }
 EXPORT_SYMBOL(fbtft_unregister_framebuffer);
 
This page took 0.031694 seconds and 5 git commands to generate.