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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
int i, type, cap;
/* Allocate structures for this channel */
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;
}
snd_printk(KERN_ERR "no memory\n");
return NULL;
}