]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soc: ti: knav_dma: Remove dead check on unsigned args.args[0]
authorNishanth Menon <nm@ti.com>
Tue, 12 May 2026 17:06:21 +0000 (12:06 -0500)
committerNishanth Menon <nm@ti.com>
Fri, 22 May 2026 15:55:55 +0000 (10:55 -0500)
smatch warns:

  knav_dma.c:390 of_channel_match_helper() warn: unsigned
  'args.args[0]' is never less than zero.

of_phandle_args.args[] is uint32_t, so the 'args.args[0] < 0' check
is always false. of_parse_phandle_with_fixed_args() already handles
errors by returning a non-zero code, which is checked immediately
above. Remove the dead check.

Reviewed-by: Sai Sree Kartheek Adivi <s-adivi@ti.com>
Reviewed-by: Hari Prasath Gujulan Elango <gehariprasath@ti.com>
Link: https://patch.msgid.link/20260512170623.3174416-10-nm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/soc/ti/knav_dma.c

index 462d181ca56453a9c317716911b4be5c4bb34cae..7ba6fd58e9ce2c54836041e8c8fe29a07883d54e 100644 (file)
@@ -387,11 +387,6 @@ static int of_channel_match_helper(struct device_node *np, const char *name,
                return -ENODEV;
        }
 
-       if (args.args[0] < 0) {
-               dev_err(kdev->dev, "Missing args for %s\n", name);
-               return -ENODEV;
-       }
-
        return args.args[0];
 }