Skip to content

Commit

Permalink
Merge branch 'for-3.1' into for-3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Aug 22, 2011
2 parents 33c5f96 + c09f5ca commit 09d930a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
5 changes: 3 additions & 2 deletions sound/soc/ep93xx/ep93xx-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,14 @@ static int ep93xx_i2s_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
err = -ENODEV;
goto fail;
goto fail_free_info;
}

info->mem = request_mem_region(res->start, resource_size(res),
pdev->name);
if (!info->mem) {
err = -EBUSY;
goto fail;
goto fail_free_info;
}

info->regs = ioremap(info->mem->start, resource_size(info->mem));
Expand Down Expand Up @@ -435,6 +435,7 @@ static int ep93xx_i2s_probe(struct platform_device *pdev)
iounmap(info->regs);
fail_release_mem:
release_mem_region(info->mem->start, resource_size(info->mem));
fail_free_info:
kfree(info);
fail:
return err;
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/fsl/fsl_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,10 +878,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
* assume that device_node pointers are a valid comparison.
*/
np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
of_node_put(np);
if (np == dma_channel_np)
return ssi_np;

np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0);
of_node_put(np);
if (np == dma_channel_np)
return ssi_np;
}
Expand Down
18 changes: 9 additions & 9 deletions sound/soc/fsl/mpc8610_hpcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,10 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
}

machine_data = kzalloc(sizeof(struct mpc8610_hpcd_data), GFP_KERNEL);
if (!machine_data)
return -ENOMEM;
if (!machine_data) {
ret = -ENOMEM;
goto error_alloc;
}

machine_data->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev);
machine_data->dai[0].ops = &mpc8610_hpcd_ops;
Expand Down Expand Up @@ -494,22 +496,20 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
ret = platform_device_add(sound_device);
if (ret) {
dev_err(&pdev->dev, "platform device add failed\n");
goto error;
goto error_sound;
}
dev_set_drvdata(&pdev->dev, sound_device);

of_node_put(codec_np);

return 0;

error_sound:
platform_device_unregister(sound_device);
error:
of_node_put(codec_np);

if (sound_device)
platform_device_unregister(sound_device);

kfree(machine_data);

error_alloc:
of_node_put(codec_np);
return ret;
}

Expand Down
4 changes: 3 additions & 1 deletion sound/soc/fsl/p1022_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,10 @@ static int get_dma_channel(struct device_node *ssi_np,
* dai->platform name should already point to an allocated buffer.
*/
ret = of_address_to_resource(dma_channel_np, 0, &res);
if (ret)
if (ret) {
of_node_put(dma_channel_np);
return ret;
}
snprintf((char *)dai->platform_name, DAI_NAME_SIZE, "%llx.%s",
(unsigned long long) res.start, dma_channel_np->name);

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/kirkwood/kirkwood-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ static __devinit int kirkwood_i2s_dev_probe(struct platform_device *pdev)
if (!priv->mem) {
dev_err(&pdev->dev, "request_mem_region failed\n");
err = -EBUSY;
goto error;
goto error_alloc;
}

priv->io = ioremap(priv->mem->start, SZ_16K);
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,7 @@ struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template,

if (prefix) {
name_len = strlen(long_name) + strlen(prefix) + 2;
name = kmalloc(name_len, GFP_ATOMIC);
name = kmalloc(name_len, GFP_KERNEL);
if (!name)
return NULL;

Expand Down

0 comments on commit 09d930a

Please sign in to comment.