aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/imx-sdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/imx-sdma.c')
-rw-r--r--drivers/dma/imx-sdma.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index a7708b481eab..df400691f9a0 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1126,22 +1126,14 @@ static int __init sdma_get_firmware(struct sdma_engine *sdma,
1126 const char *fw_name) 1126 const char *fw_name)
1127{ 1127{
1128 const struct firmware *fw; 1128 const struct firmware *fw;
1129 char *fwname;
1130 const struct sdma_firmware_header *header; 1129 const struct sdma_firmware_header *header;
1131 int ret; 1130 int ret;
1132 const struct sdma_script_start_addrs *addr; 1131 const struct sdma_script_start_addrs *addr;
1133 unsigned short *ram_code; 1132 unsigned short *ram_code;
1134 1133
1135 fwname = kasprintf(GFP_KERNEL, "%s", fw_name); 1134 ret = request_firmware(&fw, fw_name, sdma->dev);
1136 if (!fwname) 1135 if (ret)
1137 return -ENOMEM;
1138
1139 ret = request_firmware(&fw, fwname, sdma->dev);
1140 if (ret) {
1141 kfree(fwname);
1142 return ret; 1136 return ret;
1143 }
1144 kfree(fwname);
1145 1137
1146 if (fw->size < sizeof(*header)) 1138 if (fw->size < sizeof(*header))
1147 goto err_firmware; 1139 goto err_firmware;