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 <yejiayily@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f474f5e535
commit
308c32f9e8
|
@ -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)
|
if (!bd || bd->magic != DGNC_BOARD_MAGIC)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
|
|
||||||
ret = get_user(arg, value);
|
ret = get_user(arg, value);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue