summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-12 18:14:54 +0200
committerTakashi Iwai <tiwai@suse.de>2017-08-12 23:32:46 +0200
commitc38774d830aef6710676e7e5797d979c2bbb45ba (patch)
tree99d5335819ebd96b9057467f48723fd569b7866a
parentdee49895b197936c02d27d651e58c90bac18f452 (diff)
ALSA: pcxhr: Delete an error message for a failed memory allocation in pcxhr_create()
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 <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/pcxhr/pcxhr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index e6f9aa67cc6f..f9ae72f28ddc 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -1215,10 +1215,8 @@ static int pcxhr_create(struct pcxhr_mgr *mgr,
};
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
- if (! chip) {
- dev_err(card->dev, "cannot allocate chip\n");
+ if (!chip)
return -ENOMEM;
- }
chip->card = card;
chip->chip_idx = idx;