patch-2.0.37 linux/drivers/sound/audio.c

Next file: linux/fs/Config.in
Previous file: linux/drivers/scsi/tripace_mcode.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.36/linux/drivers/sound/audio.c linux/drivers/sound/audio.c
@@ -201,6 +201,9 @@
   p = 0;
   c = count;
 
+  if (count < 0)
+    return -EINVAL;
+
   if ((audio_mode[dev] & AM_READ) && !(audio_devs[dev]->flags & DMA_DUPLEX))
     {				/* Direction change */
     }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov