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:
Jiayi Ye 2014-10-25 20:04:17 +08:00 коммит произвёл Greg Kroah-Hartman
Родитель f474f5e535
Коммит 308c32f9e8
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -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;