From 53f75b6ab9fcf78f3aabd608cdec212b718e1182 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 11 Mar 2022 15:25:26 +0000 Subject: [PATCH] trivial: Fix critical warning when vendor is unset for a SCSI device --- plugins/scsi/fu-scsi-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/scsi/fu-scsi-device.c b/plugins/scsi/fu-scsi-device.c index 6d04763ef..2d23cc1fa 100644 --- a/plugins/scsi/fu-scsi-device.c +++ b/plugins/scsi/fu-scsi-device.c @@ -35,7 +35,8 @@ fu_scsi_device_probe(FuDevice *device, GError **error) /* vendor */ vendor = fu_udev_device_get_sysfs_attr(FU_UDEV_DEVICE(device), "vendor", NULL); - vendor_safe = fu_common_strstrip(vendor); + if (vendor != NULL) + vendor_safe = fu_common_strstrip(vendor); if (vendor_safe == NULL || g_strcmp0(vendor_safe, "ATA") == 0) { g_set_error_literal(error, FWUPD_ERROR,