diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-30 11:32:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-10 16:01:11 +0200 |
commit | 4c08ccf0dc50a7a4e8d1ddc41e9e6d5d25aacdc1 (patch) | |
tree | 0b4dd7cfbd124f9163a56e2cb93fb32ea7d13e6b /drivers/usb/mon | |
parent | d4950d5dab78a78c90c0c5cd6113af28cbac516f (diff) | |
download | op-kernel-dev-4c08ccf0dc50a7a4e8d1ddc41e9e6d5d25aacdc1.zip op-kernel-dev-4c08ccf0dc50a7a4e8d1ddc41e9e6d5d25aacdc1.tar.gz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/mon/mon_stat.c b/drivers/usb/mon/mon_stat.c index ebd6189..5388a33 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; |