]> git.baikalelectronics.ru Git - kernel.git/commit
[media] drivers/media/usb/usbvision/usbvision-core.c: Remove useless return variables
authorPeter Senna Tschudin <peter.senna@gmail.com>
Sat, 31 May 2014 13:14:08 +0000 (10:14 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 4 Jul 2014 18:35:02 +0000 (15:35 -0300)
commit307ba890bf161b14ef97978ffbfc02612fa8a78a
tree2c2804978aa467feec6f8194c084c5847f506ea0
parent37357174f1e7082dcd3c5d44f95e82baeebd3e41
[media] drivers/media/usb/usbvision/usbvision-core.c: Remove useless return variables

This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
    when strict
return
- ret
+ C
;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/usbvision/usbvision-core.c