diff options
Diffstat (limited to 'drivers/serial/ucc_uart.c')
-rw-r--r-- | drivers/serial/ucc_uart.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c index 46de564aaea0..465f2fae1025 100644 --- a/drivers/serial/ucc_uart.c +++ b/drivers/serial/ucc_uart.c | |||
@@ -1179,16 +1179,18 @@ static void uart_firmware_cont(const struct firmware *fw, void *context) | |||
1179 | 1179 | ||
1180 | if (firmware->header.length != fw->size) { | 1180 | if (firmware->header.length != fw->size) { |
1181 | dev_err(dev, "invalid firmware\n"); | 1181 | dev_err(dev, "invalid firmware\n"); |
1182 | return; | 1182 | goto out; |
1183 | } | 1183 | } |
1184 | 1184 | ||
1185 | ret = qe_upload_firmware(firmware); | 1185 | ret = qe_upload_firmware(firmware); |
1186 | if (ret) { | 1186 | if (ret) { |
1187 | dev_err(dev, "could not load firmware\n"); | 1187 | dev_err(dev, "could not load firmware\n"); |
1188 | return; | 1188 | goto out; |
1189 | } | 1189 | } |
1190 | 1190 | ||
1191 | firmware_loaded = 1; | 1191 | firmware_loaded = 1; |
1192 | out: | ||
1193 | release_firmware(fw); | ||
1192 | } | 1194 | } |
1193 | 1195 | ||
1194 | static int ucc_uart_probe(struct of_device *ofdev, | 1196 | static int ucc_uart_probe(struct of_device *ofdev, |
@@ -1247,7 +1249,7 @@ static int ucc_uart_probe(struct of_device *ofdev, | |||
1247 | */ | 1249 | */ |
1248 | ret = request_firmware_nowait(THIS_MODULE, | 1250 | ret = request_firmware_nowait(THIS_MODULE, |
1249 | FW_ACTION_HOTPLUG, filename, &ofdev->dev, | 1251 | FW_ACTION_HOTPLUG, filename, &ofdev->dev, |
1250 | &ofdev->dev, uart_firmware_cont); | 1252 | GFP_KERNEL, &ofdev->dev, uart_firmware_cont); |
1251 | if (ret) { | 1253 | if (ret) { |
1252 | dev_err(&ofdev->dev, | 1254 | dev_err(&ofdev->dev, |
1253 | "could not load firmware %s\n", | 1255 | "could not load firmware %s\n", |