ASoC: 88pm860x: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Sachin Kamat 2013-05-03 14:39:23 +05:30 committed by Mark Brown
parent f722406faa
commit b1d9e66c1c
1 changed files with 2 additions and 7 deletions

View File

@ -1444,7 +1444,7 @@ static int pm860x_codec_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_IRQ, i); res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
if (!res) { if (!res) {
dev_err(&pdev->dev, "Failed to get IRQ resources\n"); dev_err(&pdev->dev, "Failed to get IRQ resources\n");
goto out; return -EINVAL;
} }
pm860x->irq[i] = res->start + chip->irq_base; pm860x->irq[i] = res->start + chip->irq_base;
strncpy(pm860x->name[i], res->name, MAX_NAME_LEN); strncpy(pm860x->name[i], res->name, MAX_NAME_LEN);
@ -1454,19 +1454,14 @@ static int pm860x_codec_probe(struct platform_device *pdev)
pm860x_dai, ARRAY_SIZE(pm860x_dai)); pm860x_dai, ARRAY_SIZE(pm860x_dai));
if (ret) { if (ret) {
dev_err(&pdev->dev, "Failed to register codec\n"); dev_err(&pdev->dev, "Failed to register codec\n");
goto out; return -EINVAL;
} }
return ret; return ret;
out:
platform_set_drvdata(pdev, NULL);
return -EINVAL;
} }
static int pm860x_codec_remove(struct platform_device *pdev) static int pm860x_codec_remove(struct platform_device *pdev)
{ {
snd_soc_unregister_codec(&pdev->dev); snd_soc_unregister_codec(&pdev->dev);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }