summaryrefslogtreecommitdiff
path: root/drivers/staging/fbtft
diff options
context:
space:
mode:
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>2015-02-27 15:10:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-01 16:57:36 -0800
commit11107ffe2cd1c1dc5948713fc08a1372185be0d5 (patch)
treee29f7faaac9e4b61e6bd436db4191aef30f744e5 /drivers/staging/fbtft
parent30211d0d9df78c8135d9f5cadc77a8baa9f83793 (diff)
staging: fbtft: remove unused variable
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>
Diffstat (limited to 'drivers/staging/fbtft')
-rw-r--r--drivers/staging/fbtft/fbtft-core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index ac4287f9d6b8..8ca45110cfbe 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -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);