diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-09-10 02:56:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-11 00:45:25 -0400 |
commit | 0ba8abb770a8771ffb05cce2a5a7441530f06a55 (patch) | |
tree | cf367a99f6cf61499edc3e9d58bd7b4f927da59e | |
parent | 304f0a4edbbb2d273d7c6043df4126b623cd472c (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>
-rw-r--r-- | drivers/atm/nicstar.c | 3 |
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) | |||
2023 | 2023 | ||
2024 | cell = skb->data; | 2024 | cell = skb->data; |
2025 | for (i = ns_rsqe_cellcount(rsqe); i; i--) { | 2025 | for (i = ns_rsqe_cellcount(rsqe); i; i--) { |
2026 | if ((sb = dev_alloc_skb(NS_SMSKBSIZE)) == NULL) { | 2026 | sb = dev_alloc_skb(NS_SMSKBSIZE); |
2027 | if (!sb) { | ||
2027 | printk | 2028 | printk |
2028 | ("nicstar%d: Can't allocate buffers for aal0.\n", | 2029 | ("nicstar%d: Can't allocate buffers for aal0.\n", |
2029 | card->index); | 2030 | card->index); |