Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263376
b: refs/heads/master
c: c09f5ca
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and Mark Brown committed Aug 22, 2011
1 parent 17e6b5c commit 6b470f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 178b279b645a14ca8ea01e4ea818c88681a31b07
refs/heads/master: c09f5ca7bdc9a82c5f721bc28c46d65452240cfa
18 changes: 9 additions & 9 deletions trunk/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

0 comments on commit 6b470f8

Please sign in to comment.