Message ID | 236c998d-02d4-f120-3d03-4619a2bb89d9@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c index 9428ea7cdf8a..7a364f17f39e 100644 --- a/drivers/hid/hid-a4tech.c +++ b/drivers/hid/hid-a4tech.c @@ -91,10 +91,8 @@ static int a4_probe(struct hid_device *hdev, const struct hid_device_id *id) int ret; a4 = devm_kzalloc(&hdev->dev, sizeof(*a4), GFP_KERNEL); - if (a4 == NULL) { - hid_err(hdev, "can't alloc device descriptor\n"); + if (!a4) return -ENOMEM; - } a4->quirks = id->driver_data;