
5 Apr
2016
5 Apr
'16
9:09 p.m.
On 5 April 2016 at 07:15, Mario Six mario.six@gdsys.cc wrote:
uclass_first_device might return NULL for the device despite a zero return code. Currently, this might lead to null pointer dereferencing, since the returned device is not properly checked.
We switch to uclass_first_device_err to make sure that the returned device is valid.
Signed-off-by: Mario Six mario.six@gdsys.cc Cc: Simon Glass sjg@chromium.org
v2:
- Use uclass_first_device_err instead of explicit null checking
lib/tpm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks!
Acked-by: Simon Glass sjg@chromium.org