diff options
author | Leonard Goehrs <l.goehrs@pengutronix.de> | 2020-11-27 16:22:59 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-11-28 09:49:19 +0100 |
commit | e4e1d47c7906cf108584c617c0b2ba32ed5428ed (patch) | |
tree | 66379fd264bdac1d7ec0f240a8c9ee981fd6d5aa /sound/ppc | |
parent | ALSA: ppc: drop if block with always false condition (diff) | |
download | linux-e4e1d47c7906cf108584c617c0b2ba32ed5428ed.tar.xz linux-e4e1d47c7906cf108584c617c0b2ba32ed5428ed.zip |
ALSA: ppc: remove redundant checks in PS3 driver probe
The check for the FW_FEATURE_PS3_LV1 firmware feature is already performed
in ps3_system_bus_init() before registering the driver. So if the probe
function is actually used, this feature is already known to be available.
The check for the match id is also superfluous; the condition is always
true because the bus' match function (ps3_system_bus_match()) only
considers this driver for devices having:
dev->match_id == snd_ps3_bus_driver_info.match_id.
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Leonard Goehrs <l.goehrs@pengutronix.de>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Geoff Levand <geoff@infradead.org>
Link: https://lore.kernel.org/r/20201127152259.1470079-1-l.goehrs@pengutronix.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/ppc')
-rw-r--r-- | sound/ppc/snd_ps3.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c index 6ab796a5d936..966b709ee286 100644 --- a/sound/ppc/snd_ps3.c +++ b/sound/ppc/snd_ps3.c @@ -896,11 +896,6 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev) u64 lpar_addr, lpar_size; static u64 dummy_mask; - if (WARN_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1))) - return -ENODEV; - if (WARN_ON(dev->match_id != PS3_MATCH_ID_SOUND)) - return -ENODEV; - the_card.ps3_dev = dev; ret = ps3_open_hv_device(dev); |