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>
This commit is contained in:
Greg Kroah-Hartman 2015-04-30 11:32:58 +02:00
parent d4950d5dab
commit 4c08ccf0dc
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ static int mon_stat_open(struct inode *inode, struct file *file)
struct mon_bus *mbus; struct mon_bus *mbus;
struct snap *sp; struct snap *sp;
if ((sp = kmalloc(sizeof(struct snap), GFP_KERNEL)) == NULL) sp = kmalloc(sizeof(struct snap), GFP_KERNEL);
if (sp == NULL)
return -ENOMEM; return -ENOMEM;
mbus = inode->i_private; mbus = inode->i_private;