aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm/usbatm.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-30 05:33:05 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-10 10:01:12 -0400
commitf354c8456507e552d86acce84a7abd9bf480c382 (patch)
treec90ee243f0718b7f3a845c63325c4c18d95ded16 /drivers/usb/atm/usbatm.c
parent3383ee4c3abf2efa419ac9c78f097ea1087a4e8e (diff)
USB: usbatm.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. CC: Duncan Sands <duncan.sands@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/atm/usbatm.c')
-rw-r--r--drivers/usb/atm/usbatm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index dada0146cd7f..db322d9ccb6e 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -382,7 +382,8 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
382 "%s: got packet (length: %u, pdu_length: %u, vcc: 0x%p)", 382 "%s: got packet (length: %u, pdu_length: %u, vcc: 0x%p)",
383 __func__, length, pdu_length, vcc); 383 __func__, length, pdu_length, vcc);
384 384
385 if (!(skb = dev_alloc_skb(length))) { 385 skb = dev_alloc_skb(length);
386 if (!skb) {
386 if (printk_ratelimit()) 387 if (printk_ratelimit())
387 atm_err(instance, "%s: no memory for skb (length: %u)!\n", 388 atm_err(instance, "%s: no memory for skb (length: %u)!\n",
388 __func__, length); 389 __func__, length);
@@ -816,7 +817,8 @@ static int usbatm_atm_open(struct atm_vcc *vcc)
816 goto fail; 817 goto fail;
817 } 818 }
818 819
819 if (!(new = kzalloc(sizeof(struct usbatm_vcc_data), GFP_KERNEL))) { 820 new = kzalloc(sizeof(struct usbatm_vcc_data), GFP_KERNEL);
821 if (!new) {
820 atm_err(instance, "%s: no memory for vcc_data!\n", __func__); 822 atm_err(instance, "%s: no memory for vcc_data!\n", __func__);
821 ret = -ENOMEM; 823 ret = -ENOMEM;
822 goto fail; 824 goto fail;