diff options
author | 2024-11-11 19:54:10 +0530 | |
---|---|---|
committer | 2025-01-30 18:45:32 -0800 | |
commit | e1e481edf9718222eeb285c41c1837c1c6b0afbd (patch) | |
tree | a38a032eee29fa23d6b685e09c722d9053af759e /arch/hexagon/kernel/time.c | |
parent | hexagon: fix using plain integer as NULL pointer warning in cmpxchg (diff) | |
download | wireguard-linux-e1e481edf9718222eeb285c41c1837c1c6b0afbd.tar.xz wireguard-linux-e1e481edf9718222eeb285c41c1837c1c6b0afbd.zip |
hexagon: time: Remove redundant null check for resource
Null check for 'resource' before assignment is unnecessary because the
variable 'resource' is initialized to NULL at the beginning of the function.
Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
Link: https://lore.kernel.org/r/20241111142458.67854-1-hardevsinh.palaniya@siliconsignals.io
Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
Diffstat (limited to '')
-rw-r--r-- | arch/hexagon/kernel/time.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c index f0f207e2a694..6f851e1cd4ee 100644 --- a/arch/hexagon/kernel/time.c +++ b/arch/hexagon/kernel/time.c @@ -170,8 +170,7 @@ static void __init time_init_deferred(void) ce_dev->cpumask = cpu_all_mask; - if (!resource) - resource = rtos_timer_device.resource; + resource = rtos_timer_device.resource; /* ioremap here means this has to run later, after paging init */ rtos_timer = ioremap(resource->start, resource_size(resource)); |