Commit f51f9030 authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman

Staging: go7007: Eliminate useless code

The variable s is initialized twice to the same (side effect-free)
expression.  Drop one initialization.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@forall@
idexpression *x;
identifier f!=ERR_PTR;
@@

x = f(...)
... when != x
(
x = f(...,<+...x...+>,...)
|
* x = f(...)
)
// </smpl>
Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 79a22d5c
...@@ -139,7 +139,7 @@ failed2: ...@@ -139,7 +139,7 @@ failed2:
static void s2250loader_disconnect(struct usb_interface *interface) static void s2250loader_disconnect(struct usb_interface *interface)
{ {
pdevice_extension_t s = usb_get_intfdata(interface); pdevice_extension_t s;
printk(KERN_INFO "s2250: disconnect\n"); printk(KERN_INFO "s2250: disconnect\n");
lock_kernel(); lock_kernel();
s = usb_get_intfdata(interface); s = usb_get_intfdata(interface);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment