amd/sb600: Fix NULL test after use issue
Change-Id: Icecbcc1dee837ecfe0dd52bade3b83fdcdd15bad Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Found-by: Coverity Scan Reviewed-on: http://review.coreboot.org/8513 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
6529c33a67
commit
bdd185a355
|
@ -157,11 +157,11 @@ static u32 find_verb(u32 viddid, u32 ** verb)
|
|||
device_t azalia_dev = dev_find_slot(0, PCI_DEVFN(0x14, 2));
|
||||
struct southbridge_amd_sb600_config *cfg =
|
||||
(struct southbridge_amd_sb600_config *)azalia_dev->chip_info;
|
||||
if (!cfg)
|
||||
return 0;
|
||||
printk(BIOS_DEBUG, "Dev=%s\n", dev_path(azalia_dev));
|
||||
printk(BIOS_DEBUG, "Default viddid=%x\n", cfg->hda_viddid);
|
||||
printk(BIOS_DEBUG, "Reading viddid=%x\n", viddid);
|
||||
if (!cfg)
|
||||
return 0;
|
||||
if (viddid != cfg->hda_viddid)
|
||||
return 0;
|
||||
*verb = (u32 *) cim_verb_data;
|
||||
|
|
Loading…
Reference in New Issue