aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/opl3/opl3_lib.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-14 20:31:54 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-14 20:31:54 -0400
commit6dc6472581f693b5fc95aebedf67b4960fb85cf0 (patch)
tree06a5a9a08519950575505273eabced331ed51405 /sound/drivers/opl3/opl3_lib.c
parentee673eaa72d8d185012b1027a05e25aba18c267f (diff)
parent8acd3a60bcca17c6d89c73cee3ad6057eb83ba1e (diff)
Merge commit 'origin'
Manual fixup of conflicts on: arch/powerpc/include/asm/dcr-regs.h drivers/net/ibm_newemac/core.h
Diffstat (limited to 'sound/drivers/opl3/opl3_lib.c')
-rw-r--r--sound/drivers/opl3/opl3_lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c
index ebe4359047cb..780582340fef 100644
--- a/sound/drivers/opl3/opl3_lib.c
+++ b/sound/drivers/opl3/opl3_lib.c
@@ -139,7 +139,8 @@ static int snd_opl3_detect(struct snd_opl3 * opl3)
139 * If we had an OPL4 chip, opl3->hardware would have been set 139 * If we had an OPL4 chip, opl3->hardware would have been set
140 * by the OPL4 driver; so we can assume OPL3 here. 140 * by the OPL4 driver; so we can assume OPL3 here.
141 */ 141 */
142 snd_assert(opl3->r_port != 0, return -ENODEV); 142 if (snd_BUG_ON(!opl3->r_port))
143 return -ENODEV;
143 opl3->hardware = OPL3_HW_OPL3; 144 opl3->hardware = OPL3_HW_OPL3;
144 } 145 }
145 return 0; 146 return 0;
@@ -324,7 +325,8 @@ EXPORT_SYMBOL(snd_opl3_interrupt);
324 325
325static int snd_opl3_free(struct snd_opl3 *opl3) 326static int snd_opl3_free(struct snd_opl3 *opl3)
326{ 327{
327 snd_assert(opl3 != NULL, return -ENXIO); 328 if (snd_BUG_ON(!opl3))
329 return -ENXIO;
328 if (opl3->private_free) 330 if (opl3->private_free)
329 opl3->private_free(opl3); 331 opl3->private_free(opl3);
330 snd_opl3_clear_patches(opl3); 332 snd_opl3_clear_patches(opl3);