Re: [U-Boot] [PATCH v1] tpm: Fix uclass_first_device error handling

2016-04-05 Thread Mario Six
Hi Simon, Quoting Simon Glass : Hi Mario, On 30 March 2016 at 02:22, Mario Six 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. Hence, always c

Re: [U-Boot] [PATCH v1] tpm: Fix uclass_first_device error handling

2016-04-04 Thread Simon Glass
Hi Mario, On 30 March 2016 at 02:22, Mario Six 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. > > Hence, always check if the device returned

[U-Boot] [PATCH v1] tpm: Fix uclass_first_device error handling

2016-03-30 Thread Mario Six
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. Hence, always check if the device returned from uclass_first_device is NULL and return -ENODEV if it is. Si