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: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Julia Lawall 2010-01-16 16:59:22 +01:00 committed by Greg Kroah-Hartman
parent 79a22d5c26
commit f51f903000

View File

@ -139,7 +139,7 @@ failed2:
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");
lock_kernel();
s = usb_get_intfdata(interface);