RE: [PATCH] HID: fix noderef.cocci warnings
From: Jiri Kosina <hidden>
Date: 2016-06-20 10:40:41
On Mon, 20 Jun 2016, Masaki Ota wrote:
Hi, fengguang, ret = hid_hw_raw_request(hdev, U1_FEATURE_REPORT_ID, input, - sizeof(input), HID_FEATURE_REPORT, HID_REQ_SET_REPORT); + sizeof(*input), HID_FEATURE_REPORT, + HID_REQ_SET_REPORT);
This is a wrong fix. sizeof(*input) is sizeof(u8).
I tested this code, but our device cannot work on it. So, I think we should modify the code as below. ret = hid_hw_raw_request(hdev, U1_FEATURE_REPORT_ID, input, sizeof(u8)*U1_FEATURE_REPORT_LEN, HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
I've already applied patch that fixes this (an one more callsite with the same issue); I CCed you on the patch earlier today. -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html