diff mbox series

video: fbdev: arcfb: remove redundant initialization of variable err

Message ID 20210721102608.42694-1-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show
Series video: fbdev: arcfb: remove redundant initialization of variable err | expand

Commit Message

Colin King July 21, 2021, 10:26 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The variable err is being initialized with a value that is never
read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/video/fbdev/arcfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sam Ravnborg July 21, 2021, 11:11 a.m. UTC | #1
Hi Colin,

On Wed, Jul 21, 2021 at 11:26:08AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable err is being initialized with a value that is never
> read, the assignment is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/video/fbdev/arcfb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c
> index 1447324ed0b6..45e64016db32 100644
> --- a/drivers/video/fbdev/arcfb.c
> +++ b/drivers/video/fbdev/arcfb.c
> @@ -446,7 +446,7 @@ static ssize_t arcfb_write(struct fb_info *info, const char __user *buf,
>  	/* modded from epson 1355 */
>  
>  	unsigned long p;
> -	int err=-EINVAL;
> +	int err;
>  	unsigned int fbmemlength,x,y,w,h, bitppos, startpos, endpos, bitcount;
>  	struct arcfb_par *par;
>  	unsigned int xres;

thnaks, applied to drm-misc-next.
It will show up in -next within a week.

	Sam
diff mbox series

Patch

diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c
index 1447324ed0b6..45e64016db32 100644
--- a/drivers/video/fbdev/arcfb.c
+++ b/drivers/video/fbdev/arcfb.c
@@ -446,7 +446,7 @@  static ssize_t arcfb_write(struct fb_info *info, const char __user *buf,
 	/* modded from epson 1355 */
 
 	unsigned long p;
-	int err=-EINVAL;
+	int err;
 	unsigned int fbmemlength,x,y,w,h, bitppos, startpos, endpos, bitcount;
 	struct arcfb_par *par;
 	unsigned int xres;