From: Aya Mahfouz Date: Fri, 27 Feb 2015 13:10:30 +0000 (+0200) Subject: staging: fbtft: remove unused variable X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=11107ffe2cd1c1dc5948713fc08a1372185be0d5;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- 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);