Hi, This patch adds failure handling for a kmalloc() in the driver for the IBM 4xx PowerPC builtin ethernet.
Signed-off-by: <[EMAIL PROTECTED]> diff -pruN linux-2.6.11-orig/drivers/net/ibm_emac/ibm_emac_core.c linux-2.6.11-pi/drivers/net/ibm_emac/ibm_emac_core.c --- linux-2.6.11-orig/drivers/net/ibm_emac/ibm_emac_core.c 2005-03-05 03:30:09.000000000 +0100 +++ linux-2.6.11-pi/drivers/net/ibm_emac/ibm_emac_core.c 2005-03-06 19:00:10.000000000 +0100 @@ -1957,6 +1957,11 @@ static int emac_probe(struct ocp_device struct emac_def_dev *ddev; /* Add this index to the deferred init table */ ddev = kmalloc(sizeof(struct emac_def_dev), GFP_KERNEL); + if (!ddev) { + printk(KERN_ERR "emac%d: Memory allocation failed.\n", + ocpdev->def->index); + return -ENOMEM; + } ddev->ocpdev = ocpdev; ddev->mal = mal; list_add_tail(&ddev->link, &emac_init_list); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/