Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80805?usp=email )
Change subject: drivers/vpd: Return NULL for missing "feature_device_info" ......................................................................
drivers/vpd: Return NULL for missing "feature_device_info"
Previously, vpd_get_feature_device_info() might have returned empty string if the "feature_device_info" VPD entry was not found. This change ensures a NULL return in such cases.
BUG=b:324107408 TEST=Verify NULL is returned when calling vpd_get_feature_device_info() on a platform with a wiped VPD.
Change-Id: I76fc220ed792abdfefb0b1a37873b5b828bfdda8 Signed-off-by: Subrata Banik subratabanik@google.com --- M src/drivers/vpd/vpd_device_feature.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/80805/1
diff --git a/src/drivers/vpd/vpd_device_feature.c b/src/drivers/vpd/vpd_device_feature.c index 1c8682a..5413c01 100644 --- a/src/drivers/vpd/vpd_device_feature.c +++ b/src/drivers/vpd/vpd_device_feature.c @@ -11,5 +11,5 @@ if (vpd_gets(VPD_KEY_FEATURE_DEVICE_INFO, device_info, VPD_FEATURE_DEVICE_INFO_LEN, VPD_RW)) return device_info; - return ""; + return NULL; }