diff options
Diffstat (limited to 'sound/oss/mpu401.c')
| -rw-r--r-- | sound/oss/mpu401.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c index 734b8f9e2f7..3bbc3ec5be8 100644 --- a/sound/oss/mpu401.c +++ b/sound/oss/mpu401.c @@ -19,6 +19,7 @@ */ #include <linux/module.h> +#include <linux/slab.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/spinlock.h> @@ -566,7 +567,6 @@ static int mpu401_out(int dev, unsigned char midi_byte) static int mpu401_command(int dev, mpu_command_rec * cmd) { int i, timeout, ok; - int ret = 0; unsigned long flags; struct mpu_config *devc; @@ -643,7 +643,6 @@ retry: } } } - ret = 0; cmd->data[0] = 0; if (cmd->nr_returns) @@ -665,7 +664,7 @@ retry: } } spin_unlock_irqrestore(&devc->lock,flags); - return ret; + return 0; } static int mpu_cmd(int dev, int cmd, int data) @@ -770,7 +769,7 @@ static int mpu_synth_ioctl(int dev, unsigned int cmd, void __user *arg) midi_dev = synth_devs[dev]->midi_dev; - if (midi_dev < 0 || midi_dev > num_midis || midi_devs[midi_dev] == NULL) + if (midi_dev < 0 || midi_dev >= num_midis || midi_devs[midi_dev] == NULL) return -ENXIO; devc = &dev_conf[midi_dev]; |
