Browse Source

ALSA: rme9652: Delete an error message for a failed memory allocation in snd_hdspm_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>
Markus Elfring 8 years ago
parent
commit
9dba54296b
1 changed files with 1 additions and 5 deletions
  1. 1 5
      sound/pci/rme9652/hdspm.c

+ 1 - 5
sound/pci/rme9652/hdspm.c

@@ -6638,12 +6638,8 @@ static int snd_hdspm_create(struct snd_card *card,
 	dev_dbg(card->dev, "kmalloc Mixer memory of %zd Bytes\n",
 	dev_dbg(card->dev, "kmalloc Mixer memory of %zd Bytes\n",
 			sizeof(struct hdspm_mixer));
 			sizeof(struct hdspm_mixer));
 	hdspm->mixer = kzalloc(sizeof(struct hdspm_mixer), GFP_KERNEL);
 	hdspm->mixer = kzalloc(sizeof(struct hdspm_mixer), GFP_KERNEL);
-	if (!hdspm->mixer) {
-		dev_err(card->dev,
-			"unable to kmalloc Mixer memory of %d Bytes\n",
-				(int)sizeof(struct hdspm_mixer));
+	if (!hdspm->mixer)
 		return -ENOMEM;
 		return -ENOMEM;
-	}
 
 
 	hdspm->port_names_in = NULL;
 	hdspm->port_names_in = NULL;
 	hdspm->port_names_out = NULL;
 	hdspm->port_names_out = NULL;