Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: mon_stat.c: move assignment out of if () block

We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Felipe Balbi <balbi@ti.com>

+2 -1
+2 -1
drivers/usb/mon/mon_stat.c
··· 28 28 struct mon_bus *mbus; 29 29 struct snap *sp; 30 30 31 - if ((sp = kmalloc(sizeof(struct snap), GFP_KERNEL)) == NULL) 31 + sp = kmalloc(sizeof(struct snap), GFP_KERNEL); 32 + if (sp == NULL) 32 33 return -ENOMEM; 33 34 34 35 mbus = inode->i_private;