From: Sachin Kamat Date: Fri, 3 May 2013 09:09:23 +0000 (+0530) Subject: ASoC: 88pm860x: Remove redundant platform_set_drvdata() X-Git-Tag: next-20130521~48^2~22^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b1d9e66c1c8d0e4ad29328c4f37266f292d722d3;p=karo-tx-linux.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index 60159c07448d..1382f3f3f4bf 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c @@ -1444,7 +1444,7 @@ static int pm860x_codec_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_IRQ, i); if (!res) { dev_err(&pdev->dev, "Failed to get IRQ resources\n"); - goto out; + return -EINVAL; } pm860x->irq[i] = res->start + chip->irq_base; 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)); if (ret) { dev_err(&pdev->dev, "Failed to register codec\n"); - goto out; + return -EINVAL; } return ret; - -out: - platform_set_drvdata(pdev, NULL); - return -EINVAL; } static int pm860x_codec_remove(struct platform_device *pdev) { snd_soc_unregister_codec(&pdev->dev); - platform_set_drvdata(pdev, NULL); return 0; }