[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4F5E64EB.6050200@wwwdotorg.org>
Date: Mon, 12 Mar 2012 15:04:43 -0600
From: Stephen Warren <swarren@...dotorg.org>
To: Linus Walleij <linus.walleij@...ricsson.com>
CC: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Shawn Guo <shawn.guo@...escale.com>,
Thomas Abraham <thomas.abraham@...aro.org>,
Dong Aisheng <dong.aisheng@...aro.org>,
Rajendra Nayak <rajendra.nayak@...aro.org>,
Haojian Zhuang <haojian.zhuang@...vell.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH] pinctrl: fix error path in pinconf_map_to_setting()
On 03/12/2012 02:41 PM, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@...aro.org>
>
> The code was using the union member
> setting->data.configs.group_or_pin to store a potential
> error code, but since that member is unsigned the
> < 0 comparison was not true, letting errors pass thru,
"thru" is a pet peeve of mine; it'd be great to spell this correctly as
"through".
> ending up as mapped to pin "-22". Fix this up and print
> the error.
Oops. Sorry about that.
> Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
...
> - setting->data.configs.group_or_pin =
> - pin_get_from_name(pctldev,
> - map->data.configs.group_or_pin);
> - if (setting->data.configs.group_or_pin < 0)
> - return setting->data.configs.group_or_pin;
> + ret = pin_get_from_name(pctldev,
> + map->data.configs.group_or_pin);
> + if (ret < 0) {
"ret" here is named "pin" other places pin_get_from_name() is called,
and that naming seems to make a bit more sense here too.
Otherwise,
Acked-by: Stephen Warren <swarren@...dotorg.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists