Message ID | 14c9b364-5a38-88f3-0cd4-913ca95dfc31@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c index 596227ddb6e0..f4439dc64497 100644 --- a/drivers/hid/hid-lg.c +++ b/drivers/hid/hid-lg.c @@ -728,10 +728,9 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id) } drv_data = kzalloc(sizeof(struct lg_drv_data), GFP_KERNEL); - if (!drv_data) { - hid_err(hdev, "Insufficient memory, cannot allocate driver data\n"); + if (!drv_data) return -ENOMEM; - } + drv_data->quirks = id->driver_data; hid_set_drvdata(hdev, (void *)drv_data);