Skip to contentSkip to conversation

ar9170usb: fix spurious firmware related message

PATCH New Christian Lamparter 1 participant 1 message Aug 8, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ar9170usb: fix spurious firmware related message

When ar9170-2.fw was missing, the driver erroneously complained about missing the initialization values file ar9170-1.fw...

---

drivers/net/wireless/ath/ar9170/usb.c +5 -1
index 1aec7af..e0138ac 100644
@@ -598,11 +598,15 @@ static int ar9170_usb_request_firmware(struct ar9170_usb *aru)
 
 	err = request_firmware(&aru->init_values, "ar9170-1.fw",
 			       &aru->udev->dev);
+	if (err) {
+		dev_err(&aru->udev->dev, "file with init values not found.\n");
+		return err;
+	}
 
 	err = request_firmware(&aru->firmware, "ar9170-2.fw", &aru->udev->dev);
 	if (err) {
 		release_firmware(aru->init_values);
-		dev_err(&aru->udev->dev, "file with init values not found.\n");
+		dev_err(&aru->udev->dev, "firmware file not found.\n");
 		return err;
 	}