ALSA: line6: Remove superfluous NULL checks
authorChris Rorvick <chris@rorvick.com>
Tue, 20 Jan 2015 08:20:48 +0000 (02:20 -0600)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 Jan 2015 08:52:20 +0000 (09:52 +0100)
Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/line6/driver.c

index a3da18b876d13933160aaa3584bd89478bd05207..3757b0c0305409c005af84462b82043cd945d6b6 100644 (file)
@@ -456,21 +456,11 @@ int line6_probe(struct usb_interface *interface,
                const struct line6_properties *properties,
                int (*private_init)(struct usb_interface *, struct usb_line6 *))
 {
-       struct usb_device *usbdev;
+       struct usb_device *usbdev = interface_to_usbdev(interface);
        struct snd_card *card;
        int interface_number;
        int ret;
 
-       if (!interface) {
-               ret = -ENODEV;
-               goto err_put;
-       }
-       usbdev = interface_to_usbdev(interface);
-       if (!usbdev) {
-               ret = -ENODEV;
-               goto err_put;
-       }
-
        /* we don't handle multiple configurations */
        if (usbdev->descriptor.bNumConfigurations != 1) {
                ret = -ENODEV;