From: Simon Glass Date: Fri, 14 May 2021 01:39:28 +0000 (-0600) Subject: pinctrl: Avoid coverity warning when checking width X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=4d159b6f84abeaacb346cfd14a3b0c6fb86f43f9;p=u-boot.git pinctrl: Avoid coverity warning when checking width The width is set up in single_of_to_plat() and can only have three values, all of which result in a non-zero divisor. Add a comment. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 331154) --- diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 7af6c5f0b0..cf9ad3670f 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -471,6 +471,7 @@ static int single_probe(struct udevice *dev) return -ENOMEM; #endif + /* looks like a possible divide by 0, but data->width avoids this */ priv->npins = size / (pdata->width / BITS_PER_BYTE); if (pdata->bits_per_mux) { if (!pdata->mask) {