staging/easycap: easycap_probe: take out duplicated code from ifdef - else
authorTomas Winkler <tomas.winkler@intel.com>
Wed, 6 Apr 2011 14:37:34 +0000 (17:37 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Apr 2011 01:08:07 +0000 (18:08 -0700)
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/easycap/easycap_main.c

index 68b1f4fd1cd10efa4c3c72969c2b4bae30764012..1845cce737aecda6534b6f53979f705b0dec2702 100644 (file)
@@ -4183,11 +4183,6 @@ static int easycap_usb_probe(struct usb_interface *intf,
                if (rc) {
                        err("easycap_alsa_probe() rc = %i\n", rc);
                        return -ENODEV;
-               } else {
-                       JOM(8, "kref_get() with %i=kref.refcount.counter\n",
-                                       peasycap->kref.refcount.counter);
-                       kref_get(&peasycap->kref);
-                       peasycap->registered_audio++;
                }
 
 #else /* CONFIG_EASYCAP_OSS */
@@ -4196,15 +4191,14 @@ static int easycap_usb_probe(struct usb_interface *intf,
                        SAY("ERROR: usb_register_dev() failed\n");
                        usb_set_intfdata(intf, NULL);
                        return -ENODEV;
-               } else {
-                       JOM(8, "kref_get() with %i=kref.refcount.counter\n",
-                                       peasycap->kref.refcount.counter);
-                       kref_get(&peasycap->kref);
-                       peasycap->registered_audio++;
                }
                SAM("easyoss attached to minor #%d\n", intf->minor);
 #endif /* CONFIG_EASYCAP_OSS */
 
+               JOM(8, "kref_get() with %i=kref.refcount.counter\n",
+                               peasycap->kref.refcount.counter);
+               kref_get(&peasycap->kref);
+               peasycap->registered_audio++;
                break;
        }
 /*---------------------------------------------------------------------------*/