[PATCH 2.5] ES968: kmalloc params fix

From: Pablo Menichini (pablo@menichini.com.ar)
Date: Mon Mar 31 2003 - 12:39:54 EST


This patch swaps the arguments of kmalloc, and relax the type
of allocation to GFP_KERNEL as others PnP functions do.

Pablo

--- sound/isa/sb/es968.c.orig Sun Mar 30 14:30:08 2003
+++ sound/isa/sb/es968.c Sun Mar 30 14:32:16 2003
@@ -95,7 +95,7 @@
                                         const struct pnp_card_id *id)
 {
         struct pnp_dev *pdev;
- struct pnp_resource_table * cfg = kmalloc(GFP_ATOMIC, sizeof(struct pnp_resource_table));
+ struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL);
         int err;
         if (!cfg)
                 return -ENOMEM;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:37 EST