On 04/17/2018 09:51 PM, Dan Carpenter wrote: > Hello Aaron Ma, > > 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. Sorry for the mistake. Aaron > wrote it like: > > if (!ret) > return 0; > > 1244 return ret; > 1245 } > 1246 > 1247 if (hid->driver && hid->driver->reset_resume) { > 1248 ret = hid->driver->reset_resume(hid); > 1249 return ret; > 1250 } > 1251 > 1252 return 0; > 1253 } > > regards, > dan carpenter > -- 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