[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <697dc142-6d2a-f39f-19bb-54c8eeea454b@users.sourceforge.net>
Date: Wed, 9 Aug 2017 10:01:55 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: alsa-devel@...a-project.org, Jaroslav Kysela <perex@...ex.cz>,
Kees Cook <keescook@...omium.org>,
Takashi Iwai <tiwai@...e.com>,
Takashi Sakamoto <o-takashi@...amocchi.jp>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/4] ALSA: emux: Adjust one function call together with a
variable assignment
From: Markus Elfring <elfring@...rs.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@...rs.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
Powered by blists - more mailing lists