ALSA: line6: Remove superfluous NULL checks in each driver
The interface and driver objects are always set when callbacks are called. Drop such superfluous NULL checks in init and disconnect calls of each driver. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -214,12 +214,7 @@ static void line6_variax_disconnect(struct usb_interface *interface)
|
||||
{
|
||||
struct usb_line6_variax *variax;
|
||||
|
||||
if (!interface)
|
||||
return;
|
||||
|
||||
variax = usb_get_intfdata(interface);
|
||||
if (!variax)
|
||||
return;
|
||||
|
||||
del_timer(&variax->startup_timer1);
|
||||
del_timer(&variax->startup_timer2);
|
||||
@@ -244,9 +239,6 @@ static int variax_init(struct usb_interface *interface,
|
||||
init_timer(&variax->startup_timer2);
|
||||
INIT_WORK(&variax->startup_work, variax_startup6);
|
||||
|
||||
if ((interface == NULL) || (variax == NULL))
|
||||
return -ENODEV;
|
||||
|
||||
/* initialize USB buffers: */
|
||||
variax->buffer_activate = kmemdup(variax_activate,
|
||||
sizeof(variax_activate), GFP_KERNEL);
|
||||
|
Reference in New Issue
Block a user