From: Hardevsinh Palaniya Date: Mon, 11 Nov 2024 14:24:10 +0000 (+0530) Subject: hexagon: time: Remove redundant null check for resource X-Git-Tag: v6.14-rc1~9^2~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e1e481edf9718222eeb285c41c1837c1c6b0afbd;p=linux-2.6-block.git 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 Link: https://lore.kernel.org/r/20241111142458.67854-1-hardevsinh.palaniya@siliconsignals.io Signed-off-by: Brian Cain Signed-off-by: Brian Cain --- 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));