[PATCH] mfd: cs42l43: Remove redundant NULL checks on SoundWire
From: Charles Keepax
Date: Wed Jul 08 2026 - 06:10:30 EST
The SoundWire core helpers now check for NULL on the SoundWire
peripheral so there is no need to do so locally, remove the
duplicate checks.
Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/mfd/cs42l43.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c
index d2bbd2f18af7d..33479ddd539a6 100644
--- a/drivers/mfd/cs42l43.c
+++ b/drivers/mfd/cs42l43.c
@@ -588,12 +588,9 @@ static int cs42l43_wait_for_attach(struct cs42l43 *cs42l43)
{
int ret;
- if (cs42l43->sdw) {
- ret = sdw_slave_wait_for_init(cs42l43->sdw,
- CS42L43_SDW_ATTACH_TIMEOUT_MS);
- if (ret)
- return ret;
- }
+ ret = sdw_slave_wait_for_init(cs42l43->sdw, CS42L43_SDW_ATTACH_TIMEOUT_MS);
+ if (ret)
+ return ret;
regcache_cache_only(cs42l43->regmap, false);
--
2.47.3