Commit 91811a3
Wolfram Sang
i2c: smbus: fix NULL function pointer dereference
Baruch reported an OOPS when using the designware controller as target
only. Target-only modes break the assumption of one transfer function
always being available. Fix this by always checking the pointer in
__i2c_transfer.
Reported-by: Baruch Siach <[email protected]>
Closes: https://lore.kernel.org/r/4269631780e5ba789cf1ae391eec1b959def7d99.1712761976.git.baruch@tkos.co.il
Fixes: 4b1acc4 ("i2c: core changes for slave support")
[wsa: dropped the simplification in core-smbus to avoid theoretical regressions]
Signed-off-by: Wolfram Sang <[email protected]>
Tested-by: Baruch Siach <[email protected]>1 parent 1d422e4 commit 91811a3
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2200 | 2200 | | |
2201 | 2201 | | |
2202 | 2202 | | |
2203 | | - | |
| 2203 | + | |
2204 | 2204 | | |
2205 | 2205 | | |
2206 | 2206 | | |
2207 | 2207 | | |
2208 | 2208 | | |
2209 | 2209 | | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
2210 | 2215 | | |
2211 | 2216 | | |
2212 | 2217 | | |
| |||
2273 | 2278 | | |
2274 | 2279 | | |
2275 | 2280 | | |
2276 | | - | |
2277 | | - | |
2278 | | - | |
2279 | | - | |
2280 | | - | |
2281 | 2281 | | |
2282 | 2282 | | |
2283 | 2283 | | |
| |||
0 commit comments