From f51f90300010937bc9a2455cef88366448a6e718 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sat, 16 Jan 2010 16:59:22 +0100 Subject: [PATCH] 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/) // @forall@ idexpression *x; identifier f!=ERR_PTR; @@ x = f(...) ... when != x ( x = f(...,<+...x...+>,...) | * x = f(...) ) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/go7007/s2250-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/go7007/s2250-loader.c b/drivers/staging/go7007/s2250-loader.c index ef833e0d63ae..1de2dfb16d3f 100644 --- a/drivers/staging/go7007/s2250-loader.c +++ b/drivers/staging/go7007/s2250-loader.c @@ -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); -- 2.20.1