RE: [PATCH] HID: fix noderef.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux