diff options
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r-- | sound/soc/fsl/fsl_dma.c | 2 | ||||
-rw-r--r-- | sound/soc/fsl/mpc8610_hpcd.c | 18 | ||||
-rw-r--r-- | sound/soc/fsl/p1022_ds.c | 4 |
3 files changed, 14 insertions, 10 deletions
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index 0efc04af8f15..ef15402a3bc4 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c | |||
@@ -878,10 +878,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np) | |||
878 | * assume that device_node pointers are a valid comparison. | 878 | * assume that device_node pointers are a valid comparison. |
879 | */ | 879 | */ |
880 | np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0); | 880 | np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0); |
881 | of_node_put(np); | ||
881 | if (np == dma_channel_np) | 882 | if (np == dma_channel_np) |
882 | return ssi_np; | 883 | return ssi_np; |
883 | 884 | ||
884 | np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0); | 885 | np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0); |
886 | of_node_put(np); | ||
885 | if (np == dma_channel_np) | 887 | if (np == dma_channel_np) |
886 | return ssi_np; | 888 | return ssi_np; |
887 | } | 889 | } |
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index a19297959587..358f0baaf71b 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -345,8 +345,10 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) | |||
345 | } | 345 | } |
346 | 346 | ||
347 | machine_data = kzalloc(sizeof(struct mpc8610_hpcd_data), GFP_KERNEL); | 347 | machine_data = kzalloc(sizeof(struct mpc8610_hpcd_data), GFP_KERNEL); |
348 | if (!machine_data) | 348 | if (!machine_data) { |
349 | return -ENOMEM; | 349 | ret = -ENOMEM; |
350 | goto error_alloc; | ||
351 | } | ||
350 | 352 | ||
351 | machine_data->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev); | 353 | machine_data->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev); |
352 | machine_data->dai[0].ops = &mpc8610_hpcd_ops; | 354 | machine_data->dai[0].ops = &mpc8610_hpcd_ops; |
@@ -494,7 +496,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) | |||
494 | ret = platform_device_add(sound_device); | 496 | ret = platform_device_add(sound_device); |
495 | if (ret) { | 497 | if (ret) { |
496 | dev_err(&pdev->dev, "platform device add failed\n"); | 498 | dev_err(&pdev->dev, "platform device add failed\n"); |
497 | goto error; | 499 | goto error_sound; |
498 | } | 500 | } |
499 | dev_set_drvdata(&pdev->dev, sound_device); | 501 | dev_set_drvdata(&pdev->dev, sound_device); |
500 | 502 | ||
@@ -502,14 +504,12 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) | |||
502 | 504 | ||
503 | return 0; | 505 | return 0; |
504 | 506 | ||
507 | error_sound: | ||
508 | platform_device_unregister(sound_device); | ||
505 | error: | 509 | error: |
506 | of_node_put(codec_np); | ||
507 | |||
508 | if (sound_device) | ||
509 | platform_device_unregister(sound_device); | ||
510 | |||
511 | kfree(machine_data); | 510 | kfree(machine_data); |
512 | 511 | error_alloc: | |
512 | of_node_put(codec_np); | ||
513 | return ret; | 513 | return ret; |
514 | } | 514 | } |
515 | 515 | ||
diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index 8fa4d5f8eda1..fcb862eb0c73 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c | |||
@@ -297,8 +297,10 @@ static int get_dma_channel(struct device_node *ssi_np, | |||
297 | * dai->platform name should already point to an allocated buffer. | 297 | * dai->platform name should already point to an allocated buffer. |
298 | */ | 298 | */ |
299 | ret = of_address_to_resource(dma_channel_np, 0, &res); | 299 | ret = of_address_to_resource(dma_channel_np, 0, &res); |
300 | if (ret) | 300 | if (ret) { |
301 | of_node_put(dma_channel_np); | ||
301 | return ret; | 302 | return ret; |
303 | } | ||
302 | snprintf((char *)dai->platform_name, DAI_NAME_SIZE, "%llx.%s", | 304 | snprintf((char *)dai->platform_name, DAI_NAME_SIZE, "%llx.%s", |
303 | (unsigned long long) res.start, dma_channel_np->name); | 305 | (unsigned long long) res.start, dma_channel_np->name); |
304 | 306 | ||