summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorSonghee Baek <sbaek@nvidia.com>2014-02-03 11:10:34 -0800
committerSandeep Trasi <strasi@nvidia.com>2014-02-05 10:31:05 -0800
commit0460850e05f14e4f6c5bb6c45d372d83cdc20498 (patch)
tree1fc9b5f41b9ac07b4b196d09b5905df94d61dec5 /sound/soc
parent9070f31a0aff658e8993cf1bf3f24e0b8eb2ceb8 (diff)
ASoC: tegra-alt: fix checking error case.
To register max9487, this machine driver uses i2c_new_device, i2c_new_device returns NULL when it is error case, not a error code. So, IS_ERR is not proper to check the error. Bug 1425688 Change-Id: I7ee323bfcbc546abb2b63dc7e35f9100ffd85290 Signed-off-by: Songhee Baek <sbaek@nvidia.com> Reviewed-on: http://git-master/r/362965 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Gajanan Bhat <gbhat@nvidia.com> Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com> Reviewed-by: Bob Johnston <bjohnston@nvidia.com> Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/tegra-alt/tegra_vcm30t124_alt.c2
-rw-r--r--sound/soc/tegra-alt/tegra_vcm30t124_b00_alt.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/tegra-alt/tegra_vcm30t124_alt.c b/sound/soc/tegra-alt/tegra_vcm30t124_alt.c
index 750242602827..23cd3099f29b 100644
--- a/sound/soc/tegra-alt/tegra_vcm30t124_alt.c
+++ b/sound/soc/tegra-alt/tegra_vcm30t124_alt.c
@@ -970,7 +970,7 @@ static int tegra_vcm30t124_driver_probe(struct platform_device *pdev)
machine->max9485_client = i2c_new_device(i2c_get_adapter(0),
&max9485_info);
- if (IS_ERR(machine->max9485_client)) {
+ if (!machine->max9485_client) {
dev_err(&pdev->dev, "cannot get i2c device for max9485\n");
goto err;
diff --git a/sound/soc/tegra-alt/tegra_vcm30t124_b00_alt.c b/sound/soc/tegra-alt/tegra_vcm30t124_b00_alt.c
index cef83a59c900..67efccd6ef5d 100644
--- a/sound/soc/tegra-alt/tegra_vcm30t124_b00_alt.c
+++ b/sound/soc/tegra-alt/tegra_vcm30t124_b00_alt.c
@@ -1214,7 +1214,7 @@ static int tegra_vcm30t124_driver_probe(struct platform_device *pdev)
machine->max9485_client = i2c_new_device(i2c_get_adapter(0),
&max9485_info);
- if (IS_ERR(machine->max9485_client)) {
+ if (!machine->max9485_client) {
dev_err(&pdev->dev, "cannot get i2c device for max9485\n");
goto err;