summaryrefslogtreecommitdiff
path: root/sound/isa/sb/emu8000.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/sb/emu8000.c')
-rw-r--r--sound/isa/sb/emu8000.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c
index 1c90421a88dc..896a862a9f9c 100644
--- a/sound/isa/sb/emu8000.c
+++ b/sound/isa/sb/emu8000.c
@@ -1029,7 +1029,9 @@ snd_emu8000_create_mixer(struct snd_card *card, struct snd_emu8000 *emu)
memset(emu->controls, 0, sizeof(emu->controls));
for (i = 0; i < EMU8000_NUM_CONTROLS; i++) {
- if ((err = snd_ctl_add(card, emu->controls[i] = snd_ctl_new1(mixer_defs[i], emu))) < 0) {
+ emu->controls[i] = snd_ctl_new1(mixer_defs[i], emu);
+ err = snd_ctl_add(card, emu->controls[i]);
+ if (err < 0) {
emu->controls[i] = NULL;
goto __error;
}
@@ -1095,9 +1097,10 @@ snd_emu8000_new(struct snd_card *card, int index, long port, int seq_ports,
hw->port1 = port;
hw->port2 = port + 0x400;
hw->port3 = port + 0x800;
- if (!(hw->res_port1 = request_region(hw->port1, 4, "Emu8000-1")) ||
- !(hw->res_port2 = request_region(hw->port2, 4, "Emu8000-2")) ||
- !(hw->res_port3 = request_region(hw->port3, 4, "Emu8000-3"))) {
+ hw->res_port1 = request_region(hw->port1, 4, "Emu8000-1");
+ hw->res_port2 = request_region(hw->port2, 4, "Emu8000-2");
+ hw->res_port3 = request_region(hw->port3, 4, "Emu8000-3");
+ if (!hw->res_port1 || !hw->res_port2 || !hw->res_port3) {
snd_printk(KERN_ERR "sbawe: can't grab ports 0x%lx, 0x%lx, 0x%lx\n", hw->port1, hw->port2, hw->port3);
snd_emu8000_free(hw);
return -EBUSY;
@@ -1118,12 +1121,14 @@ snd_emu8000_new(struct snd_card *card, int index, long port, int seq_ports,
}
snd_emu8000_init_hw(hw);
- if ((err = snd_emu8000_create_mixer(card, hw)) < 0) {
+ err = snd_emu8000_create_mixer(card, hw);
+ if (err < 0) {
snd_emu8000_free(hw);
return err;
}
- if ((err = snd_device_new(card, SNDRV_DEV_CODEC, hw, &ops)) < 0) {
+ err = snd_device_new(card, SNDRV_DEV_CODEC, hw, &ops);
+ if (err < 0) {
snd_emu8000_free(hw);
return err;
}