summaryrefslogtreecommitdiff
path: root/drivers/atm
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-09-10 08:56:03 +0200
committerDavid S. Miller <davem@davemloft.net>2016-09-10 21:45:25 -0700
commit0ba8abb770a8771ffb05cce2a5a7441530f06a55 (patch)
treecf367a99f6cf61499edc3e9d58bd7b4f927da59e /drivers/atm
parent304f0a4edbbb2d273d7c6043df4126b623cd472c (diff)
ATM-nicstar: Refactor a dev_alloc_skb() call in dequeue_rx()
The script "checkpatch.pl" can point out that assignments should usually not be performed within condition checks. Thus move an assignment for a local variable to a separate statement in this function. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/nicstar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index 04f5781dca30..c7296b583787 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -2023,7 +2023,8 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
cell = skb->data;
for (i = ns_rsqe_cellcount(rsqe); i; i--) {
- if ((sb = dev_alloc_skb(NS_SMSKBSIZE)) == NULL) {
+ sb = dev_alloc_skb(NS_SMSKBSIZE);
+ if (!sb) {
printk
("nicstar%d: Can't allocate buffers for aal0.\n",
card->index);