Skip to contentSkip to conversation

clocksource/drivers/timer-ti-dm: Remove unnecessary NULL check

PATCH Applied Dan Carpenter 2 participants 2 messages May 19, 2022 – May 27, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clocksource/drivers/timer-ti-dm: Remove unnecessary NULL check

The "pdata" pointer cannot be NULL because it's checked at the start of the function. Delete the check.

---
 drivers/clocksource/timer-ti-dm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/clocksource/timer-ti-dm.c +1 -2
index f51d24301ff1..469f7c91564b 100644
@@ -943,8 +943,7 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
 		cpu_pm_register_notifier(&timer->nb);
 	}
 
-	if (pdata)
-		timer->errata = pdata->timer_errata;
+	timer->errata = pdata->timer_errata;
 
 	timer->pdev = pdev;
 
Signature · 1 line
2.35.1
merge bot Applied
#1 lore raw
The following commit has been merged into the timers/core branch of tip:

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     8c0d9461ab760439b09ae321803ee85df1136e08
Gitweb:        https://git.kernel.org/tip/8c0d9461ab760439b09ae321803ee85df1136e08
Author:        Dan Carpenter <[email protected]>
AuthorDate:    Thu, 19 May 2022 16:58:23 +03:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Tue, 24 May 2022 09:16:29 +02:00

clocksource/drivers/timer-ti-dm: Remove unnecessary NULL check

The "pdata" pointer cannot be NULL because it's checked at the start of the function. Delete the check.

---
 drivers/clocksource/timer-ti-dm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/clocksource/timer-ti-dm.c +1 -2
index 3e52c52..33609be 100644
@@ -828,8 +828,7 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
 		cpu_pm_register_notifier(&timer->nb);
 	}
 
-	if (pdata)
-		timer->errata = pdata->timer_errata;
+	timer->errata = pdata->timer_errata;
 
 	timer->pdev = pdev;