提交 4c08ccf0 编写于 作者: G Greg Kroah-Hartman

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: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: NFelipe Balbi <balbi@ti.com>
上级 d4950d5d
......@@ -28,7 +28,8 @@ static int mon_stat_open(struct inode *inode, struct file *file)
struct mon_bus *mbus;
struct snap *sp;
if ((sp = kmalloc(sizeof(struct snap), GFP_KERNEL)) == NULL)
sp = kmalloc(sizeof(struct snap), GFP_KERNEL);
if (sp == NULL)
return -ENOMEM;
mbus = inode->i_private;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册