Re: [PATCH] i2c: i2c-mt65xx: fix NULL ptr dereference

2019-09-28 Thread Wolfram Sang
> - if (adap->quirks->flags & I2C_AQ_NO_ZERO_LEN) > + if (adap->quirks && adap->quirks->flags & I2C_AQ_NO_ZERO_LEN) Right. Please use i2c_check_quirks(). Otherwise thanks for the catch! @Mediatek-people: can we have a dedicated maintainer for this driver to better prevent stuff like

[PATCH] i2c: i2c-mt65xx: fix NULL ptr dereference

2019-09-25 Thread Fabien Parent
Since commit abf4923e97c3 ("i2c: mediatek: disable zero-length transfers for mt8183"), there is a NULL pointer dereference for all the SoCs that don't have any quirk. mtk_i2c_functionality is not checking that the quirks pointer is not NULL before starting to use it. This commit add a check on