Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1707122 > unrolled thread

[PATCH 1/4] ALSA: emux: Adjust one function call together with a variable assignment

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-08-09 10:10 +0200
Last post2017-08-09 10:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/4] ALSA: emux: Adjust one function call together with a  variable assignment SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-09 10:10 +0200

#1707122 — [PATCH 1/4] ALSA: emux: Adjust one function call together with a variable assignment

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-08-09 10:10 +0200
Subject[PATCH 1/4] ALSA: emux: Adjust one function call together with a variable assignment
Message-ID<ucudX-4nj-17@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 9 Aug 2017 08:40:14 +0200

The script "checkpatch.pl" pointed information out like the following.

ERROR: do not use assignment in if condition

Thus fix the affected source code place.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/synth/emux/emux_seq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c
index 55579f6b8cb2..53820f75ba3e 100644
--- a/sound/synth/emux/emux_seq.c
+++ b/sound/synth/emux/emux_seq.c
@@ -144,7 +144,8 @@ snd_emux_create_port(struct snd_emux *emu, char *name,
 	int i, type, cap;
 
 	/* Allocate structures for this channel */
-	if ((p = kzalloc(sizeof(*p), GFP_KERNEL)) == NULL) {
+	p = kzalloc(sizeof(*p), GFP_KERNEL);
+	if (!p) {
 		snd_printk(KERN_ERR "no memory\n");
 		return NULL;
 	}
-- 
2.13.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web