Skip to content

Commit

Permalink
ALSA: ps3: Use WARN_ON() instead of BUG_ON()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tiwai committed Nov 6, 2013
1 parent 29fa957 commit 025be74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/ppc/snd_ps3.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,10 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
int i, ret;
u64 lpar_addr, lpar_size;

BUG_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1));
BUG_ON(dev->match_id != PS3_MATCH_ID_SOUND);
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;

Expand Down

0 comments on commit 025be74

Please sign in to comment.