On Tue, 17 Apr 2018, Aaron Ma wrote: > > The patch 3e83eda46705: "HID: i2c-hid: Fix resume issue on Raydium > > touchscreen device" from Apr 9, 2018, leads to the following static > > checker warning: > > > > drivers/hid/i2c-hid/i2c-hid.c:1244 i2c_hid_resume() > > info: return a literal instead of 'ret' > > > > drivers/hid/i2c-hid/i2c-hid.c > > 1232 enable_irq(client->irq); > > 1233 ret = i2c_hid_hwreset(client); > > 1234 if (ret) > > 1235 return ret; > > 1236 > > 1237 /* RAYDIUM device (2386:3118) need to re-send report descr cmd > > 1238 * after resume, after this it will be back normal. > > 1239 * otherwise it issues too many incomplete reports. > > 1240 */ > > 1241 if (ihid->quirks & I2C_HID_QUIRK_RESEND_REPORT_DESCR) { > > 1242 ret = i2c_hid_command(client, &hid_report_descr_cmd, NULL, 0); > > 1243 if (!ret) > > ^^^^ > > This test looks inverted? If not then it would be more obvious if we > > Sorry, my bad, it should be: > if (ret) > Thanks Dan > > Hi Jiri: > > There is a mistake in i2c-hid patch. > How could I fix this mistake, should I send another fix or V2 patch. Hi, thanks for reporting, good catch; I'll fix that up before sending the branch to Linus. -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html