summaryrefslogtreecommitdiffstats
path: root/drivers/usb/mon
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-30 11:32:58 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-10 16:01:11 +0200
commit4c08ccf0dc50a7a4e8d1ddc41e9e6d5d25aacdc1 (patch)
tree0b4dd7cfbd124f9163a56e2cb93fb32ea7d13e6b /drivers/usb/mon
parentd4950d5dab78a78c90c0c5cd6113af28cbac516f (diff)
downloadblackbird-op-linux-4c08ccf0dc50a7a4e8d1ddc41e9e6d5d25aacdc1.tar.gz
blackbird-op-linux-4c08ccf0dc50a7a4e8d1ddc41e9e6d5d25aacdc1.zip
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>
Diffstat (limited to 'drivers/usb/mon')
-rw-r--r--drivers/usb/mon/mon_stat.c3
1 files changed, 2 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud