diff options
Diffstat (limited to 'sound/soc/codecs/wl1273.c')
-rw-r--r-- | sound/soc/codecs/wl1273.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index 4ead0dc02b87..f3d4e88d0b7b 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c | |||
@@ -341,8 +341,9 @@ static int wl1273_hw_params(struct snd_pcm_substream *substream, | |||
341 | struct wl1273_core *core = wl1273->core; | 341 | struct wl1273_core *core = wl1273->core; |
342 | unsigned int rate, width, r; | 342 | unsigned int rate, width, r; |
343 | 343 | ||
344 | if (params_format(params) != SNDRV_PCM_FORMAT_S16_LE) { | 344 | if (params_width(params) != 16) { |
345 | pr_err("Only SNDRV_PCM_FORMAT_S16_LE supported.\n"); | 345 | dev_err(dai->dev, "%d bits/sample not supported\n", |
346 | params_width(params)); | ||
346 | return -EINVAL; | 347 | return -EINVAL; |
347 | } | 348 | } |
348 | 349 | ||
@@ -461,10 +462,8 @@ static int wl1273_probe(struct snd_soc_codec *codec) | |||
461 | } | 462 | } |
462 | 463 | ||
463 | wl1273 = kzalloc(sizeof(struct wl1273_priv), GFP_KERNEL); | 464 | wl1273 = kzalloc(sizeof(struct wl1273_priv), GFP_KERNEL); |
464 | if (wl1273 == NULL) { | 465 | if (!wl1273) |
465 | dev_err(codec->dev, "Cannot allocate memory.\n"); | ||
466 | return -ENOMEM; | 466 | return -ENOMEM; |
467 | } | ||
468 | 467 | ||
469 | wl1273->mode = WL1273_MODE_BT; | 468 | wl1273->mode = WL1273_MODE_BT; |
470 | wl1273->core = *core; | 469 | wl1273->core = *core; |