Re: [PATCH] 6700/6702PXH quirk

From: Greg KH
Date: Fri Aug 05 2005 - 18:00:06 EST


On Fri, Aug 05, 2005 at 03:05:13PM -0700, Kristen Accardi wrote:
> +int msi_add_quirk(struct pci_dev *dev)
> +{
> + struct msi_quirk *quirk;
> +
> + quirk = (struct msi_quirk *) kmalloc(sizeof(*quirk), GFP_KERNEL);
> + if (!quirk)
> + return -ENOMEM;
> +
> + INIT_LIST_HEAD(&quirk->list);
> + quirk->dev = dev;

You just messed up the reference counting of this device :(

Anyway, Jeff is right, add another bit field.

thanks,

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