diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-11-22 13:29:01 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-11-22 15:48:33 -0500 |
commit | 4fc390a198c41a007c02f82f41ad100c7c67b55e (patch) | |
tree | ed6ed7da77182dd1d1509eef9e6ac9b32fa386af /sound/oss/uart401.c | |
parent | 966b7bc9354ab8f59f0ef2d96306615157e0f76e (diff) |
sound: oss: uart401: remove unneeded NULL check
"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>
Diffstat (limited to 'sound/oss/uart401.c')
-rw-r--r-- | sound/oss/uart401.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/oss/uart401.c b/sound/oss/uart401.c index 279bc565ac7e..dae4d4344407 100644 --- a/sound/oss/uart401.c +++ b/sound/oss/uart401.c | |||
@@ -412,13 +412,10 @@ void unload_uart401(struct address_info *hw_config) | |||
412 | 412 | ||
413 | if (!devc->share_irq) | 413 | if (!devc->share_irq) |
414 | free_irq(devc->irq, devc); | 414 | free_irq(devc->irq, devc); |
415 | if (devc) | 415 | kfree(midi_devs[devc->my_dev]->converter); |
416 | { | 416 | kfree(midi_devs[devc->my_dev]); |
417 | kfree(midi_devs[devc->my_dev]->converter); | 417 | kfree(devc); |
418 | kfree(midi_devs[devc->my_dev]); | 418 | |
419 | kfree(devc); | ||
420 | devc = NULL; | ||
421 | } | ||
422 | /* This kills midi_devs[x] */ | 419 | /* This kills midi_devs[x] */ |
423 | sound_unload_mididev(hw_config->slots[4]); | 420 | sound_unload_mididev(hw_config->slots[4]); |
424 | } | 421 | } |