Skip to contentSkip to conversation

drivers/misc: Remove unneeded variable in st_tty_open

PATCH New zhong jiang 1 participant 1 message Sep 12, 2019 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/misc: Remove unneeded variable in st_tty_open

st_tty_open do not need local variable to store different value, Hence just remove it.

---
 drivers/misc/ti-st/st_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/ti-st/st_core.c +2 -2
index 7d9e23a..2ae9948 100644
@@ -708,7 +708,6 @@ long st_write(struct sk_buff *skb)
  */
 static int st_tty_open(struct tty_struct *tty)
 {
-	int err = 0;
 	struct st_data_s *st_gdata;
 	pr_info("%s ", __func__);
 
@@ -731,7 +730,8 @@ static int st_tty_open(struct tty_struct *tty)
 	 */
 	st_kim_complete(st_gdata->kim_data);
 	pr_debug("done %s", __func__);
-	return err;
+
+	return 0;
 }
 
 static void st_tty_close(struct tty_struct *tty)
Signature · 1 line
1.7.12.4