patch-1.3.9 linux/drivers/sound/patmgr.c

Next file: linux/drivers/sound/pss.c
Previous file: linux/drivers/sound/pas2_pcm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.8/linux/drivers/sound/patmgr.c linux/drivers/sound/patmgr.c
@@ -1,7 +1,7 @@
 /*
  * sound/patmgr.c
  *
- * The patch manager interface for the /dev/sequencer
+ * The patch maneger interface for the /dev/sequencer
  *
  * Copyright by Hannu Savolainen 1993
  *
@@ -234,8 +234,12 @@
     printk ("  PATMGR: Server %d mbox full. Why?\n", dev);
   else
     {
-      mbox[dev] =
-	(struct patmgr_info *) KERNEL_MALLOC (sizeof (struct patmgr_info));
+      if ((mbox[dev] =
+	   (struct patmgr_info *) KERNEL_MALLOC (sizeof (struct patmgr_info))) == NULL)
+	{
+	  printk ("pmgr: Couldn't allocate memory for a message\n");
+	  return 0;
+	}
 
       mbox[dev]->key = PM_K_EVENT;
       mbox[dev]->command = event;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this