staging: xgifb: Removed an unnecessary assignment statement

Author: Sarah Khan <sarahjmi07@gmail.com>

Used coccinelle patch
@@

expression data;
identifier f;

@@

-data =
+return
     f(...);
-return (data);

Signed-off-by: Sarah Khan 
Signed-off-by: Greg Kroah-Hartman 
---
 drivers/staging/xgifb/vb_util.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
 
diff --git a/drivers/staging/xgifb/vb_util.c b/drivers/staging/xgifb/vb_util.c
index 1b452f8..be3437ca 100644
--- a/drivers/staging/xgifb/vb_util.c
+++ b/drivers/staging/xgifb/vb_util.c
@@ -9,11 +9,8 @@ void xgifb_reg_set(unsigned long port, u8 index, u8 data)
 
 u8 xgifb_reg_get(unsigned long port, u8 index)
 {
-	u8 data;
-
 	outb(index, port);
-	data = inb(port + 1);
-	return data;
+	return inb(port + 1);
 }
 
 void xgifb_reg_and_or(unsigned long port, u8 index,
BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.