Skip to contentSkip to conversation

media: wl128x: Fix an error code in fm_download_firmware()

PATCH New Dan Carpenter 1 participant 1 message Mar 6, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: wl128x: Fix an error code in fm_download_firmware()

We forgot to set "ret" on this error path.

Fixes e8454ff7b9a4 ("[media] drivers:media:radio: wl128x: FM Driver Common sources")
---
 drivers/media/radio/wl128x/fmdrv_common.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/media/radio/wl128x/fmdrv_common.c +3 -2
index 3c8987af3772..1614809f7d35 100644
@@ -1268,8 +1268,9 @@ static int fm_download_firmware(struct fmdev *fmdev, const u8 *fw_name)
 
 		switch (action->type) {
 		case ACTION_SEND_COMMAND:	/* Send */
-			if (fmc_send_cmd(fmdev, 0, 0, action->data,
-						action->size, NULL, NULL))
+			ret = fmc_send_cmd(fmdev, 0, 0, action->data,
+					   action->size, NULL, NULL);
+			if (ret)
 				goto rel_fw;
 
 			cmd_cnt++;
Signature · 1 line
2.17.1