From 08a0b90230a4b14a8349f39a84af6dacee2621ad Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sun, 21 Aug 2011 13:18:45 +0200 Subject: [PATCH] --- yaml --- r: 270541 b: refs/heads/master c: 0bb98ba2b045e53b4724f34509455b7653c329d3 h: refs/heads/master i: 270539: 194aa9015bf7d4f84df594cd99ea8112a094eb5f v: v3 --- [refs] | 2 +- trunk/sound/soc/mxs/mxs-saif.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 36296ca3c866..811a6c561cda 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bbe8ff5e25afd4d06c8a8bad009aca5f0d0c22ef +refs/heads/master: 0bb98ba2b045e53b4724f34509455b7653c329d3 diff --git a/trunk/sound/soc/mxs/mxs-saif.c b/trunk/sound/soc/mxs/mxs-saif.c index 530017f7d14a..af5734f6dab7 100644 --- a/trunk/sound/soc/mxs/mxs-saif.c +++ b/trunk/sound/soc/mxs/mxs-saif.c @@ -521,12 +521,13 @@ static int mxs_saif_probe(struct platform_device *pdev) struct mxs_saif *saif; int ret = 0; + if (pdev->id >= ARRAY_SIZE(mxs_saif)) + return -EINVAL; + saif = kzalloc(sizeof(*saif), GFP_KERNEL); if (!saif) return -ENOMEM; - if (pdev->id >= ARRAY_SIZE(mxs_saif)) - return -EINVAL; mxs_saif[pdev->id] = saif; saif->clk = clk_get(&pdev->dev, NULL);