Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/isdn/hisax: Drop unused list

The file st5481_init.c locally defines and initializes the adapter_list
variable, but does not use it for anything. Removing the list makes it
possible to remove the list field from the st5481_adapter data structure.
In the function probe_st5481, it also makes it possible to free the locally
allocated adapter value on an error exit.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Julia Lawall and committed by
David S. Miller
5310cbce c319b4d7

+1 -6
-1
drivers/isdn/hisax/st5481.h
··· 377 377 }; 378 378 379 379 struct st5481_adapter { 380 - struct list_head list; 381 380 int number_of_leds; 382 381 struct usb_device *usb_dev; 383 382 struct hisax_d_if hisax_d_if;
+1 -5
drivers/isdn/hisax/st5481_init.c
··· 46 46 #endif 47 47 int st5481_debug; 48 48 49 - static LIST_HEAD(adapter_list); 50 - 51 49 /* ====================================================================== 52 50 * registration/deregistration with the USB layer 53 51 */ ··· 84 86 adapter->bcs[i].b_if.ifc.priv = &adapter->bcs[i]; 85 87 adapter->bcs[i].b_if.ifc.l2l1 = st5481_b_l2l1; 86 88 } 87 - list_add(&adapter->list, &adapter_list); 88 89 89 90 retval = st5481_setup_usb(adapter); 90 91 if (retval < 0) ··· 122 125 err_usb: 123 126 st5481_release_usb(adapter); 124 127 err: 128 + kfree(adapter); 125 129 return -EIO; 126 130 } 127 131 ··· 140 142 if (!adapter) 141 143 return; 142 144 143 - list_del(&adapter->list); 144 - 145 145 st5481_stop(adapter); 146 146 st5481_release_b(&adapter->bcs[1]); 147 147 st5481_release_b(&adapter->bcs[0]);