Commit 5310cbce authored by Julia Lawall's avatar Julia Lawall Committed by David S. Miller

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: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c319b4d7
...@@ -377,7 +377,6 @@ struct st5481_bcs { ...@@ -377,7 +377,6 @@ struct st5481_bcs {
}; };
struct st5481_adapter { struct st5481_adapter {
struct list_head list;
int number_of_leds; int number_of_leds;
struct usb_device *usb_dev; struct usb_device *usb_dev;
struct hisax_d_if hisax_d_if; struct hisax_d_if hisax_d_if;
......
...@@ -46,8 +46,6 @@ module_param(debug, int, 0); ...@@ -46,8 +46,6 @@ module_param(debug, int, 0);
#endif #endif
int st5481_debug; int st5481_debug;
static LIST_HEAD(adapter_list);
/* ====================================================================== /* ======================================================================
* registration/deregistration with the USB layer * registration/deregistration with the USB layer
*/ */
...@@ -86,7 +84,6 @@ static int probe_st5481(struct usb_interface *intf, ...@@ -86,7 +84,6 @@ static int probe_st5481(struct usb_interface *intf,
adapter->bcs[i].b_if.ifc.priv = &adapter->bcs[i]; adapter->bcs[i].b_if.ifc.priv = &adapter->bcs[i];
adapter->bcs[i].b_if.ifc.l2l1 = st5481_b_l2l1; adapter->bcs[i].b_if.ifc.l2l1 = st5481_b_l2l1;
} }
list_add(&adapter->list, &adapter_list);
retval = st5481_setup_usb(adapter); retval = st5481_setup_usb(adapter);
if (retval < 0) if (retval < 0)
...@@ -125,6 +122,7 @@ static int probe_st5481(struct usb_interface *intf, ...@@ -125,6 +122,7 @@ static int probe_st5481(struct usb_interface *intf,
err_usb: err_usb:
st5481_release_usb(adapter); st5481_release_usb(adapter);
err: err:
kfree(adapter);
return -EIO; return -EIO;
} }
...@@ -142,8 +140,6 @@ static void disconnect_st5481(struct usb_interface *intf) ...@@ -142,8 +140,6 @@ static void disconnect_st5481(struct usb_interface *intf)
if (!adapter) if (!adapter)
return; return;
list_del(&adapter->list);
st5481_stop(adapter); st5481_stop(adapter);
st5481_release_b(&adapter->bcs[1]); st5481_release_b(&adapter->bcs[1]);
st5481_release_b(&adapter->bcs[0]); st5481_release_b(&adapter->bcs[0]);
......
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