sound: oss: uart401: remove unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 22 Nov 2014 18:29:01 +0000 (21:29 +0300)
committerTakashi Iwai <tiwai@suse.de>
Sat, 22 Nov 2014 20:48:33 +0000 (21:48 +0100)
"devc" can't be NULL here so there is no need to check.  Also I removed
the "devc = NULL" assignment because devc is stored on stack so it's
a no-op.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/oss/uart401.c

index 279bc565ac7e9a01a7d0a8093041d734d31aaefe..dae4d4344407875bb627acbe25b115b5fb734a19 100644 (file)
@@ -412,13 +412,10 @@ void unload_uart401(struct address_info *hw_config)
 
        if (!devc->share_irq)
                free_irq(devc->irq, devc);
-       if (devc)
-       {
-               kfree(midi_devs[devc->my_dev]->converter);
-               kfree(midi_devs[devc->my_dev]);
-               kfree(devc);
-               devc = NULL;
-       }
+       kfree(midi_devs[devc->my_dev]->converter);
+       kfree(midi_devs[devc->my_dev]);
+       kfree(devc);
+
        /* This kills midi_devs[x] */
        sound_unload_mididev(hw_config->slots[4]);
 }