diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-11-05 09:01:47 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-11-06 02:34:58 -0500 |
commit | 025be74c1db44158dd3cfe43b89ba16266d01062 (patch) | |
tree | f0a3d01b60d3932f947fd72f5464a69d0212bf78 /sound/ppc/snd_ps3.c | |
parent | 29fa9578046ea51e9cf97c4e16207ea6ec375084 (diff) |
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>
Diffstat (limited to 'sound/ppc/snd_ps3.c')
-rw-r--r-- | sound/ppc/snd_ps3.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c index 8c7dcbe0118d..ebb76f2d90d7 100644 --- a/sound/ppc/snd_ps3.c +++ b/sound/ppc/snd_ps3.c | |||
@@ -933,8 +933,10 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev) | |||
933 | int i, ret; | 933 | int i, ret; |
934 | u64 lpar_addr, lpar_size; | 934 | u64 lpar_addr, lpar_size; |
935 | 935 | ||
936 | BUG_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1)); | 936 | if (WARN_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1))) |
937 | BUG_ON(dev->match_id != PS3_MATCH_ID_SOUND); | 937 | return -ENODEV; |
938 | if (WARN_ON(dev->match_id != PS3_MATCH_ID_SOUND)) | ||
939 | return -ENODEV; | ||
938 | 940 | ||
939 | the_card.ps3_dev = dev; | 941 | the_card.ps3_dev = dev; |
940 | 942 | ||