mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
soc: ti: knav_dma: Remove dead check on unsigned args.args[0]
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>
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user