Skip to content

Commit e1e481e

Browse files
hardevsinh-1androm3da
authored andcommitted
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>
1 parent 8a20030 commit e1e481e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/hexagon/kernel/time.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ static void __init time_init_deferred(void)
170170

171171
ce_dev->cpumask = cpu_all_mask;
172172

173-
if (!resource)
174-
resource = rtos_timer_device.resource;
173+
resource = rtos_timer_device.resource;
175174

176175
/* ioremap here means this has to run later, after paging init */
177176
rtos_timer = ioremap(resource->start, resource_size(resource));

0 commit comments

Comments
 (0)