ALSA: ps3: Use WARN_ON() instead of BUG_ON()

BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2013-11-05 15:01:47 +01:00
parent 29fa957804
commit 025be74c1d
1 changed files with 4 additions and 2 deletions

View File

@ -933,8 +933,10 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
int i, ret; int i, ret;
u64 lpar_addr, lpar_size; u64 lpar_addr, lpar_size;
BUG_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1)); if (WARN_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1)))
BUG_ON(dev->match_id != PS3_MATCH_ID_SOUND); return -ENODEV;
if (WARN_ON(dev->match_id != PS3_MATCH_ID_SOUND))
return -ENODEV;
the_card.ps3_dev = dev; the_card.ps3_dev = dev;