diff options
| author | Harshit Mogalapalli <[email protected]> | 2023-03-20 23:14:15 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-03-21 09:00:08 +0100 |
| commit | 6b301ded45a6d9538f5f579a2e9f4b6c45fa988b (patch) | |
| tree | 0efa15543234ae9acdc71128a6b01741a1079d87 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | fea087fc291b102521427c26da3d0a30c329606f (diff) | |
tpm: Fix a possible dereference of ERR_PTR in tpm_init()
Smatch reports:
drivers/char/tpm/tpm-interface.c:470 tpm_init() error:
'tpm_class' dereferencing possible ERR_PTR()
If class_create() returns error pointer, we are dereferencing a possible
error pointer. Fix this by moving the dereference post error handling.
Fixes: a010eb881243 ("tpm: fix up the tpm_class shutdown_pre pointer when created")
Signed-off-by: Harshit Mogalapalli <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions