[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5DriLRHgwD3rn562UM5WtwTmb-owZ+OTTmfCONvmGNG8A@mail.gmail.com>
Date: Mon, 26 Feb 2018 09:43:27 -0300
From: Fabio Estevam <festevam@...il.com>
To: Colin King <colin.king@...onical.com>
Cc: Dong Aisheng <aisheng.dong@....com>,
Shawn Guo <shawnguo@...nel.org>,
Stefan Agner <stefan@...er.ch>,
inus Walleij <linus.walleij@...aro.org>,
linux-gpio@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: imx: fix unsigned check if nfuncs with less than
or equal zero
On Mon, Feb 26, 2018 at 9:04 AM, Colin King <colin.king@...onical.com> wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> The unsigned integer nfuncs is being error checked with a value less
> or equal to zero; this is always false if of_get_child_count returns
> a -ve for an error condition since nfuncs is not signed. Fix this by
> making variables nfuncs and i signed integers.
>
> Detected with Coccinelle:
> drivers/pinctrl/freescale/pinctrl-imx.c:620:6-12: WARNING: Unsigned
> expression compared with zero: nfuncs <= 0
>
> Fixes: ae75ff814538 ("pinctrl: pinctrl-imx: add imx pinctrl core driver")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
Reviewed-by: Fabio Estevam <festevam@...il.com>
Powered by blists - more mailing lists