File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
// SPDX-License-Identifier: GPL-2.0
2
2
// Copyright (c) 2020, Linaro Limited
3
3
4
+ #include <linux/cleanup.h>
4
5
#include <sound/soc.h>
5
6
#include <sound/soc-dapm.h>
6
7
#include <sound/pcm.h>
@@ -1288,18 +1289,19 @@ int audioreach_tplg_init(struct snd_soc_component *component)
1288
1289
struct snd_soc_card * card = component -> card ;
1289
1290
struct device * dev = component -> dev ;
1290
1291
const struct firmware * fw ;
1291
- char * tplg_fw_name ;
1292
1292
int ret ;
1293
1293
1294
1294
/* Inline with Qualcomm UCM configs and linux-firmware path */
1295
- tplg_fw_name = kasprintf (GFP_KERNEL , "qcom/%s/%s-tplg.bin" , card -> driver_name , card -> name );
1295
+ char * tplg_fw_name __free (kfree ) = kasprintf (GFP_KERNEL , "qcom/%s/%s-tplg.bin" ,
1296
+ card -> driver_name ,
1297
+ card -> name );
1296
1298
if (!tplg_fw_name )
1297
1299
return - ENOMEM ;
1298
1300
1299
1301
ret = request_firmware (& fw , tplg_fw_name , dev );
1300
1302
if (ret < 0 ) {
1301
1303
dev_err (dev , "tplg firmware loading %s failed %d\n" , tplg_fw_name , ret );
1302
- goto err ;
1304
+ return ret ;
1303
1305
}
1304
1306
1305
1307
ret = snd_soc_tplg_component_load (component , & audioreach_tplg_ops , fw );
@@ -1309,8 +1311,6 @@ int audioreach_tplg_init(struct snd_soc_component *component)
1309
1311
}
1310
1312
1311
1313
release_firmware (fw );
1312
- err :
1313
- kfree (tplg_fw_name );
1314
1314
1315
1315
return ret ;
1316
1316
}
You can’t perform that action at this time.
0 commit comments