aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBas Peters <baspeters93@gmail.com>2015-02-04 17:32:59 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-05 18:40:22 -0500
commit50a58b6b1a8aeeb1609e8c0c1fd760ce0e8d37ef (patch)
treeca3461fd8cbb07019847e4f15804700f9cc5f509 /drivers
parent6e03f896b52cd2ca88942170c5c9c407ec0ede69 (diff)
drivers: isdn: isdnloop: isdnloop.c: remove assignment of variables in if conditions, in accordance with the CodingStyle.
Signed-off-by: Bas Peters <baspeters93@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/isdn/isdnloop/isdnloop.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c
index 5a4da94aefb0..af96317a52ee 100644
--- a/drivers/isdn/isdnloop/isdnloop.c
+++ b/drivers/isdn/isdnloop/isdnloop.c
@@ -59,7 +59,8 @@ isdnloop_bchan_send(isdnloop_card *card, int ch)
59 isdn_ctrl cmd; 59 isdn_ctrl cmd;
60 60
61 while (card->sndcount[ch]) { 61 while (card->sndcount[ch]) {
62 if ((skb = skb_dequeue(&card->bqueue[ch]))) { 62 skb = skb_dequeue(&card->bqueue[ch]);
63 if (skb) {
63 len = skb->len; 64 len = skb->len;
64 card->sndcount[ch] -= len; 65 card->sndcount[ch] -= len;
65 ack = *(skb->head); /* used as scratch area */ 66 ack = *(skb->head); /* used as scratch area */
@@ -317,7 +318,8 @@ isdnloop_polldchan(unsigned long data)
317 u_char *p; 318 u_char *p;
318 isdn_ctrl cmd; 319 isdn_ctrl cmd;
319 320
320 if ((skb = skb_dequeue(&card->dqueue))) 321 skb = skb_dequeue(&card->dqueue);
322 if (skb)
321 avail = skb->len; 323 avail = skb->len;
322 else 324 else
323 avail = 0; 325 avail = 0;
@@ -471,8 +473,8 @@ isdnloop_fake(isdnloop_card *card, char *s, int ch)
471{ 473{
472 struct sk_buff *skb; 474 struct sk_buff *skb;
473 int len = strlen(s) + ((ch >= 0) ? 3 : 0); 475 int len = strlen(s) + ((ch >= 0) ? 3 : 0);
474 476 skb = dev_alloc_skb(len);
475 if (!(skb = dev_alloc_skb(len))) { 477 if (!skb) {
476 printk(KERN_WARNING "isdnloop: Out of memory in isdnloop_fake\n"); 478 printk(KERN_WARNING "isdnloop: Out of memory in isdnloop_fake\n");
477 return 1; 479 return 1;
478 } 480 }
@@ -1439,8 +1441,8 @@ isdnloop_initcard(char *id)
1439{ 1441{
1440 isdnloop_card *card; 1442 isdnloop_card *card;
1441 int i; 1443 int i;
1442 1444 card = kzalloc(sizeof(isdnloop_card), GFP_KERNEL);
1443 if (!(card = kzalloc(sizeof(isdnloop_card), GFP_KERNEL))) { 1445 if (!card) {
1444 printk(KERN_WARNING 1446 printk(KERN_WARNING
1445 "isdnloop: (%s) Could not allocate card-struct.\n", id); 1447 "isdnloop: (%s) Could not allocate card-struct.\n", id);
1446 return (isdnloop_card *) 0; 1448 return (isdnloop_card *) 0;
@@ -1489,8 +1491,8 @@ static int
1489isdnloop_addcard(char *id1) 1491isdnloop_addcard(char *id1)
1490{ 1492{
1491 isdnloop_card *card; 1493 isdnloop_card *card;
1492 1494 card = isdnloop_initcard(id1);
1493 if (!(card = isdnloop_initcard(id1))) { 1495 if (!card) {
1494 return -EIO; 1496 return -EIO;
1495 } 1497 }
1496 printk(KERN_INFO 1498 printk(KERN_INFO