mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-28 07:30:26 +09:00
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: Dario Binacchi <dariobin@libero.it> Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
This commit is contained in:
parent
69414d86ed
commit
230bc623a4
@ -295,7 +295,7 @@ static int single_configure_pins(struct udevice *dev,
|
|||||||
func->npins = 0;
|
func->npins = 0;
|
||||||
for (n = 0; n < count; n++, pins++) {
|
for (n = 0; n < count; n++, pins++) {
|
||||||
offset = fdt32_to_cpu(pins->reg);
|
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",
|
dev_err(dev, " invalid register offset 0x%x\n",
|
||||||
offset);
|
offset);
|
||||||
continue;
|
continue;
|
||||||
@ -348,7 +348,7 @@ static int single_configure_bits(struct udevice *dev,
|
|||||||
func->npins = 0;
|
func->npins = 0;
|
||||||
for (n = 0; n < count; n++, pins++) {
|
for (n = 0; n < count; n++, pins++) {
|
||||||
offset = fdt32_to_cpu(pins->reg);
|
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",
|
dev_dbg(dev, " invalid register offset 0x%x\n",
|
||||||
offset);
|
offset);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user