Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-17 Thread Wolfram Sang
On Thu, May 10, 2018 at 01:16:59PM +0200, Wolfram Sang wrote: > On Sat, May 05, 2018 at 08:02:21AM -0500, Wenwen Wang wrote: > > In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to > > transfer i2c messages. The number of actual transferred messages is > > returned and saved to

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-17 Thread Wolfram Sang
> > hopefully I have time to write a small coccinelle rule to find if > > constant values are returned in a function declared as master_xfer. > > That would be a good thing. Did that now and only found drivers which have a (meanwhile) needless parameter check for 'num'. Will set you on CC for th

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-15 Thread Peter Rosin
On 2018-05-15 10:58, Wolfram Sang wrote: > Hi Peter, > In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to transfer i2c messages. The number of actual transferred messages is returned and saved to 'status'. If 'status' is negative, that means an error occurr

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-15 Thread Wolfram Sang
Hi Peter, > >> In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to > >> transfer i2c messages. The number of actual transferred messages is > >> returned and saved to 'status'. If 'status' is negative, that means an > >> error occurred during the transfer process. In that case,

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-10 Thread Peter Rosin
On 2018-05-10 13:16, Wolfram Sang wrote: > On Sat, May 05, 2018 at 08:02:21AM -0500, Wenwen Wang wrote: >> In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to >> transfer i2c messages. The number of actual transferred messages is >> returned and saved to 'status'. If 'status' is

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-10 Thread Wolfram Sang
On Sat, May 05, 2018 at 08:02:21AM -0500, Wenwen Wang wrote: > In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to > transfer i2c messages. The number of actual transferred messages is > returned and saved to 'status'. If 'status' is negative, that means an > error occurred duri