> - 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
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
2 matches
Mail list logo