File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -93,16 +93,21 @@ static int pcm030_fabric_probe(struct platform_device *op)
93
93
dev_err (& op -> dev , "platform_device_alloc() failed\n" );
94
94
95
95
ret = platform_device_add (pdata -> codec_device );
96
- if (ret )
96
+ if (ret ) {
97
97
dev_err (& op -> dev , "platform_device_add() failed: %d\n" , ret );
98
+ platform_device_put (pdata -> codec_device );
99
+ }
98
100
99
101
ret = snd_soc_register_card (card );
100
- if (ret )
102
+ if (ret ) {
101
103
dev_err (& op -> dev , "snd_soc_register_card() failed: %d\n" , ret );
104
+ platform_device_del (pdata -> codec_device );
105
+ platform_device_put (pdata -> codec_device );
106
+ }
102
107
103
108
platform_set_drvdata (op , pdata );
104
-
105
109
return ret ;
110
+
106
111
}
107
112
108
113
static int pcm030_fabric_remove (struct platform_device * op )
You can’t perform that action at this time.
0 commit comments