Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353386
b: refs/heads/master
c: 324a7fb
h: refs/heads/master
v: v3
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Jan 8, 2013
1 parent 426e81e commit c635997
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 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: 4498a3cae5012979bbf3be2064c5ca00fe29109b
refs/heads/master: 324a7fb02b9e7a226916e3593f756cd85312bae8
19 changes: 12 additions & 7 deletions trunk/sound/soc/mxs/mxs-saif.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,12 @@ static int mxs_saif_probe(struct platform_device *pdev)
if (!saif)
return -ENOMEM;

saif->id = of_alias_get_id(np, "saif");
if (saif->id < 0)
return saif->id;
ret = of_alias_get_id(np, "saif");
if (ret < 0)
return ret;
else
saif->id = ret;

/*
* If there is no "fsl,saif-master" phandle, it's a saif
* master. Otherwise, it's a slave and its phandle points
Expand All @@ -684,12 +687,14 @@ static int mxs_saif_probe(struct platform_device *pdev)
if (!master) {
saif->master_id = saif->id;
} else {
saif->master_id = of_alias_get_id(master, "saif");
if (saif->master_id < 0)
return saif->master_id;
ret = of_alias_get_id(master, "saif");
if (ret < 0)
return ret;
else
saif->master_id = ret;
}

if (saif->master_id < 0 || saif->master_id >= ARRAY_SIZE(mxs_saif)) {
if (saif->master_id >= ARRAY_SIZE(mxs_saif)) {
dev_err(&pdev->dev, "get wrong master id\n");
return -EINVAL;
}
Expand Down

0 comments on commit c635997

Please sign in to comment.