[PATCH AUTOSEL 4.18 052/136] usb: wusbcore: security: cast sizeof to int for comparison

2018-09-16 Thread Sasha Levin
From: Julia Lawall [ Upstream commit d3ac5598c5010a878ebbcca3b1c6188ca36b ] Comparing an int to a size, which is unsigned, causes the int to become unsigned, giving the wrong result. usb_get_descriptor can return a negative error code. A simplified version of the semantic match that finds

[PATCH AUTOSEL 4.18 052/136] usb: wusbcore: security: cast sizeof to int for comparison

2018-09-16 Thread Sasha Levin
From: Julia Lawall [ Upstream commit d3ac5598c5010a878ebbcca3b1c6188ca36b ] Comparing an int to a size, which is unsigned, causes the int to become unsigned, giving the wrong result. usb_get_descriptor can return a negative error code. A simplified version of the semantic match that finds