Message ID | 44c2767f-c66c-3b36-4bd1-059d5d2f4461@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index 2e79dfc92162..7672f723b268 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c @@ -804,8 +804,6 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id) if (!pk) return -ENOMEM; - pk->hdev = hdev; - pm = kzalloc(sizeof(*pm), GFP_KERNEL); if (pm == NULL) { ret = -ENOMEM; @@ -814,6 +812,7 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id) pm->pk = pk; pk->pm = pm; + pk->hdev = hdev; pm->ifnum = ifnum; hid_set_drvdata(hdev, pk);