Skip to content
Commit 62931ac2 authored by Fabien Parent's avatar Fabien Parent Committed by Wolfram Sang
Browse files

i2c: mt65xx: fix NULL ptr dereference



Since commit abf4923e ("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 call to i2c_check_quirks which will check whether
the quirks pointer is set, and if so will check if the IP has the
NO_ZERO_LEN quirk.

Fixes: abf4923e ("i2c: mediatek: disable zero-length transfers for mt8183")
Signed-off-by: default avatarFabien Parent <fparent@baylibre.com>
Reviewed-by: default avatarCengiz Can <cengiz@kernel.wtf>
Reviewed-by: default avatarHsin-Yi Wang <hsinyi@chromium.org>
Tested-by: default avatarUlrich Hecht <uli@fpond.eu>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 1f0d9cbe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment