From 4c08ccf0dc50a7a4e8d1ddc41e9e6d5d25aacdc1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 30 Apr 2015 11:32:58 +0200 Subject: 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 Reviewed-by: Felipe Balbi --- drivers/usb/mon/mon_stat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/usb/mon') diff --git a/drivers/usb/mon/mon_stat.c b/drivers/usb/mon/mon_stat.c index ebd6189a5014..5388a339cfb8 100644 --- a/drivers/usb/mon/mon_stat.c +++ b/drivers/usb/mon/mon_stat.c @@ -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; -- cgit v1.2.3-70-g09d2