Skip to content
Snippets Groups Projects
Commit 230bc623 authored by Dario Binacchi's avatar Dario Binacchi Committed by Tom Rini
Browse files

pinctrl: single: fix a never true comparison


As reported by Coverity Scan for Das U-Boot, the 'less-than-zero'
comparison of an unsigned value is never true.

Signed-off-by: default avatarDario Binacchi <dariobin@libero.it>
Reviewed-by: default avatarPratyush Yadav <p.yadav@ti.com>
parent 69414d86
No related branches found
No related tags found
No related merge requests found
......@@ -295,7 +295,7 @@ static int single_configure_pins(struct udevice *dev,
func->npins = 0;
for (n = 0; n < count; n++, pins++) {
offset = fdt32_to_cpu(pins->reg);
if (offset < 0 || offset > pdata->offset) {
if (offset > pdata->offset) {
dev_err(dev, " invalid register offset 0x%x\n",
offset);
continue;
......@@ -348,7 +348,7 @@ static int single_configure_bits(struct udevice *dev,
func->npins = 0;
for (n = 0; n < count; n++, pins++) {
offset = fdt32_to_cpu(pins->reg);
if (offset < 0 || offset > pdata->offset) {
if (offset > pdata->offset) {
dev_dbg(dev, " invalid register offset 0x%x\n",
offset);
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment