[PATCH 2.5] SB16: fix kmalloc params

Pablo Menichini (pablo@menichini.com.ar)
Thu, 10 Apr 2003 00:15:10 -0300 (ART)


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

Pablo

--- linux-2.5.67/sound/isa/sb/sb16.c Tue Apr 8 15:24:31 2003
+++ linux-local/sound/isa/sb/sb16.c Tue Apr 8 15:24:52 2003
@@ -261,7 +261,7 @@
const struct pnp_card_device_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)

-
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/