From: Kent Yoder Date: Fri, 18 Jan 2013 23:42:25 +0000 (-0600) Subject: tpm_i2c_stm_st33: fix oops when i2c client is unavailable X-Git-Tag: v3.9-rc1~137^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fbc5e95356a4600fab3a04a82dc8bb49591aedd;p=pandora-kernel.git 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: Peter Hüwe Signed-off-by: Kent Yoder --- Reading git-diff-tree failed