From: Markus Elfring Date: Sat, 12 Aug 2017 17:09:23 +0000 (+0200) Subject: ALSA: ca0106: Delete an error message for a failed memory allocation in snd_ca0106_pc... X-Git-Tag: v4.14-rc4~21^2~27^2~99 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f197acd27e9782a317f070e4ec465f5da460afd1;p=platform%2Fkernel%2Flinux-exynos.git ALSA: ca0106: Delete an error message for a failed memory allocation in snd_ca0106_pcm_open_capture_channel() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 2be30b8..cd27b55 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -660,11 +660,9 @@ static int snd_ca0106_pcm_open_capture_channel(struct snd_pcm_substream *substre int err; epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); - if (epcm == NULL) { - dev_err(chip->card->dev, - "open_capture_channel: failed epcm alloc\n"); + if (!epcm) return -ENOMEM; - } + epcm->emu = chip; epcm->substream = substream; epcm->channel_id=channel_id;