treewide: Replace bad uses of find_resource
The `find_resource` function will never return null (will die instead). In cases where the existing code already accounts for null pointers, it is better to use `probe_resource` instead, which returns a null pointer instead of dying. Change-Id: I329efcb42a444b097794fde4f40acf5ececaea8c Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58910 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Lance Zhao
This commit is contained in:
@@ -285,7 +285,7 @@ void azalia_audio_init(struct device *dev)
|
||||
struct resource *res;
|
||||
u16 codec_mask;
|
||||
|
||||
res = find_resource(dev, PCI_BASE_ADDRESS_0);
|
||||
res = probe_resource(dev, PCI_BASE_ADDRESS_0);
|
||||
if (!res)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user