diff options
author | Takashi Iwai <tiwai@suse.de> | 2025-07-09 18:04:28 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2025-07-11 09:55:38 +0200 |
commit | 691351de31684b98a7366b08cd278bb057b51fce (patch) | |
tree | 506a77b4fe19a900bc64d897a07e5861ba82f9da /sound/hda/common/bind.c | |
parent | cabaf5908e586156d1d59f3fb8c51d2b169bc636 (diff) |
ALSA: hda: Drop superfluous driver->ops NULL checks
After all conversions, driver->ops became a must in most places
(except for the codec power setup which might be called before binding
to the codec driver), hence we can get rid of the superfluous
driver->ops NULL checks, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-26-tiwai@suse.de
Diffstat (limited to 'sound/hda/common/bind.c')
-rw-r--r-- | sound/hda/common/bind.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/hda/common/bind.c b/sound/hda/common/bind.c index f85c640dd54f..bb1090b65699 100644 --- a/sound/hda/common/bind.c +++ b/sound/hda/common/bind.c @@ -52,7 +52,7 @@ static void hda_codec_unsol_event(struct hdac_device *dev, unsigned int ev) if (codec->core.dev.power.power_state.event != PM_EVENT_ON) return; - if (driver->ops && driver->ops->unsol_event) + if (driver->ops->unsol_event) driver->ops->unsol_event(codec, ev); } @@ -138,7 +138,7 @@ static int hda_codec_driver_probe(struct device *dev) return 0; error_module: - if (driver->ops && driver->ops->remove) + if (driver->ops->remove) driver->ops->remove(codec); error_module_put: module_put(owner); @@ -166,7 +166,7 @@ static int hda_codec_driver_remove(struct device *dev) wait_event(codec->remove_sleep, !refcount_read(&codec->pcm_ref)); snd_power_sync_ref(codec->bus->card); - if (driver->ops && driver->ops->remove) + if (driver->ops->remove) driver->ops->remove(codec); snd_hda_codec_cleanup_for_unbind(codec); codec->preset = NULL; |