Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1fbc5e95 authored by Kent Yoder's avatar Kent Yoder
Browse files

tpm_i2c_stm_st33: fix oops when i2c client is unavailable



When no i2c bus exists, user-space can cause an oops by triggering a
device probe through a message sent to an i2c "new_device" sysfs entry.
Adding a check for a NULL i2c client structure in the probe function
closes the hole.

This patch also fixes accessing the NULL client struct in the print
function call reporting the error.

Reported-by: default avatarPeter Hüwe <PeterHuewe@gmx.de>
Signed-off-by: default avatarKent Yoder <key@linux.vnet.ibm.com>
parent d4593353
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment