coreboot/src/superio/common
John Zhao 9857c90685 superio/common: Avoid NULL pointer dereference
Coverity detects dereferencing a pointer that might be "NULL" when
calling report_resource_stored. Add sanity check for dev to prevent
NULL pointer dereference.

Found-by: Coverity CID 1419488

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I03efad87ba761e914b47e3294c646335cfbaed24
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43553
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-07-24 21:21:09 +00:00
..
chip.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
conf_mode.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
generic.c superio/common: Avoid NULL pointer dereference 2020-07-24 21:21:09 +00:00
ssdt.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
ssdt.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00