mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
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 <sjg@chromium.org> Reported-by: Coverity (CID: 331154)
This commit is contained in:
parent
99eaf1fcaa
commit
4d159b6f84
1 changed files with 1 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue