[PATCH 2/4] soc: apple: tunable: Allow passing NULL to tunable_apply
From: Sasha Finkelstein
Date: Sun Nov 08 2026 - 10:44:27 EST
Make it easier to have optional tunables by tolerating NULL entries and
doing nothing when one is passed
Signed-off-by: Sasha Finkelstein <k@xxxxxxxxxxxxxx>
---
drivers/soc/apple/tunable.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/soc/apple/tunable.c b/drivers/soc/apple/tunable.c
index 659323839171..e89e8f9bb455 100644
--- a/drivers/soc/apple/tunable.c
+++ b/drivers/soc/apple/tunable.c
@@ -63,6 +63,8 @@ void apple_tunable_apply(void __iomem *regs, struct apple_tunable *tunable)
{
size_t i;
+ if (!tunable)
+ return;
for (i = 0; i < tunable->sz; ++i) {
u32 val, old_val;
--
2.56.0