Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c08ccf0 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
parent d4950d5d
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -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;