File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 5
5
// Copyright (C) 2012 Renesas Solutions Corp.
6
6
// Kuninori Morimoto <[email protected] >
7
7
8
+ #include <linux/cleanup.h>
8
9
#include <linux/clk.h>
9
10
#include <linux/device.h>
10
11
#include <linux/module.h>
@@ -727,7 +728,6 @@ static int simple_probe(struct platform_device *pdev)
727
728
struct device * dev = & pdev -> dev ;
728
729
struct device_node * np = dev -> of_node ;
729
730
struct snd_soc_card * card ;
730
- struct link_info * li ;
731
731
int ret ;
732
732
733
733
/* Allocate the private data and the DAI link array */
@@ -741,7 +741,7 @@ static int simple_probe(struct platform_device *pdev)
741
741
card -> probe = simple_soc_probe ;
742
742
card -> driver_name = "simple-card" ;
743
743
744
- li = devm_kzalloc ( dev , sizeof (* li ), GFP_KERNEL );
744
+ struct link_info * li __free ( kfree ) = kzalloc ( sizeof (* li ), GFP_KERNEL );
745
745
if (!li )
746
746
return - ENOMEM ;
747
747
@@ -818,7 +818,6 @@ static int simple_probe(struct platform_device *pdev)
818
818
if (ret < 0 )
819
819
goto err ;
820
820
821
- devm_kfree (dev , li );
822
821
return 0 ;
823
822
err :
824
823
simple_util_clean_reference (card );
You can’t perform that action at this time.
0 commit comments