Re: [U-Boot] [PATCH 2/8] console: Fix handling of NULL global_data

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 08:22 PM, Simon Glass wrote: > Both putc() and puts() can be called before global_data is set up. Some of > the code paths don't handle this correctly. Add an explicit test before > any member is accessed. > > Reported-by: Coverity (CID: 169030) > Signed-off-by: Simon Glass Reviewe

[U-Boot] [PATCH 2/8] console: Fix handling of NULL global_data

2018-06-09 Thread Simon Glass
Both putc() and puts() can be called before global_data is set up. Some of the code paths don't handle this correctly. Add an explicit test before any member is accessed. Reported-by: Coverity (CID: 169030) Signed-off-by: Simon Glass --- common/console.c | 8 ++-- 1 file changed, 6 insertio