diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-25 05:06:24 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-25 05:25:51 -0400 |
commit | 29ca9c73e54131c9ad90c5381f368d9b09b5aca4 (patch) | |
tree | 4e6603438a6cb37fbf5edec3e53714ece60c3c26 /sound | |
parent | de0022d4bf3a5acaef75cf1c7c2f8d71b020e8c9 (diff) |
ASoC: samsung: fix return value check in i2s_alloc_dai()
In case of error, the function platform_device_alloc() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/samsung/i2s.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 32956df8f50c..2e031fa729f0 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c | |||
@@ -1073,7 +1073,7 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) | |||
1073 | dev_set_drvdata(&i2s->pdev->dev, i2s); | 1073 | dev_set_drvdata(&i2s->pdev->dev, i2s); |
1074 | } else { /* Create a new platform_device for Secondary */ | 1074 | } else { /* Create a new platform_device for Secondary */ |
1075 | i2s->pdev = platform_device_alloc("samsung-i2s-sec", -1); | 1075 | i2s->pdev = platform_device_alloc("samsung-i2s-sec", -1); |
1076 | if (IS_ERR(i2s->pdev)) | 1076 | if (!i2s->pdev) |
1077 | return NULL; | 1077 | return NULL; |
1078 | 1078 | ||
1079 | i2s->pdev->dev.parent = &pdev->dev; | 1079 | i2s->pdev->dev.parent = &pdev->dev; |