From: Jiayi Ye Date: Sat, 25 Oct 2014 12:04:17 +0000 (+0800) Subject: staging: dgnc: delete successive assignments to the same location X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=308c32f9e8f4ead8e6b37ed3a479ac5f95e58707;p=openwrt%2Fstaging%2Fblogic.git staging: dgnc: delete successive assignments to the same location Successive assignments to the same location is meaningless and can be deleted. The Coccinelle semantic patch was used to find cases. @@ expression e1,e2,e3; @@ ( (<+...e1++...+>)=e2; | (<+...e1--...+>)=e2; | (<+...++e1...+>)=e2; | (<+...--e1...+>)=e2; | e1=e2; e1 = <+...e1...+>; | *e1=e2; *e1=e3; ) Signed-off-by: Jiayi Ye Reviewed-by: Josh Triplett Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index 8384e3d770f1..f81a375f8bc1 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -2205,8 +2205,6 @@ static int dgnc_set_modem_info(struct tty_struct *tty, unsigned int command, uns if (!bd || bd->magic != DGNC_BOARD_MAGIC) return ret; - ret = 0; - ret = get_user(arg, value); if (ret) return ret;