Skip to content

Commit 24aaced

Browse files
author
Wolfram Sang
committed
Merge tag 'i2c-host-fixes-6.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current
i2c-host-fixes for v6.15-rc3 - ChromeOS EC tunnel: fix potential NULL pointer dereference
2 parents 75caec0 + 424eafe commit 24aaced

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/i2c/busses/i2c-cros-ec-tunnel.c

+3
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ static int ec_i2c_probe(struct platform_device *pdev)
247247
u32 remote_bus;
248248
int err;
249249

250+
if (!ec)
251+
return dev_err_probe(dev, -EPROBE_DEFER, "couldn't find parent EC device\n");
252+
250253
if (!ec->cmd_xfer) {
251254
dev_err(dev, "Missing sendrecv\n");
252255
return -EINVAL;

0 commit comments

Comments
 (0)