From 868f69069c3ad2a66188ded72e793c5501fa8c58 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Tue, 24 Apr 2012 15:24:43 +0800 Subject: [PATCH] --- yaml --- r: 300060 b: refs/heads/master c: c34ce320d9fe328e3272def20b152f39ccfa045e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-core.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 3496e5a272c3..6007261bfbfd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ddb6706af3cd372194cecd2cc61950519df620d7 +refs/heads/master: c34ce320d9fe328e3272def20b152f39ccfa045e diff --git a/trunk/sound/soc/soc-core.c b/trunk/sound/soc/soc-core.c index 3a4e93e52b6d..b390f00b4e99 100644 --- a/trunk/sound/soc/soc-core.c +++ b/trunk/sound/soc/soc-core.c @@ -3631,10 +3631,10 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, int i, ret; num_routes = of_property_count_strings(np, propname); - if (num_routes & 1) { + if (num_routes < 0 || num_routes & 1) { dev_err(card->dev, - "Property '%s's length is not even\n", - propname); + "Property '%s' does not exist or its length is not even\n", + propname); return -EINVAL; } num_routes /= 2;