diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-06-02 13:04:07 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-02 13:04:07 -0700 |
commit | a2c1aa54746bace5d03cc66521fbf3bb6fb2f916 (patch) | |
tree | 9f9e535060b9a9690c432845a9c6ee3929bef9b2 /drivers/atm/nicstar.c | |
parent | 3087e1ff8d64da7b6b527e89d0c0864ab36294b8 (diff) | |
download | linux-stable-a2c1aa54746bace5d03cc66521fbf3bb6fb2f916.tar.gz linux-stable-a2c1aa54746bace5d03cc66521fbf3bb6fb2f916.tar.bz2 linux-stable-a2c1aa54746bace5d03cc66521fbf3bb6fb2f916.zip |
[ATM]: [drivers] kill pointless NULL checks and casts before kfree()
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/nicstar.c')
-rw-r--r-- | drivers/atm/nicstar.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index 85bf5c8442b0..b2a7b754fd14 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c @@ -676,10 +676,10 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) PRINTK("nicstar%d: RSQ base at 0x%x.\n", i, (u32) card->rsq.base); /* Initialize SCQ0, the only VBR SCQ used */ - card->scq1 = (scq_info *) NULL; - card->scq2 = (scq_info *) NULL; + card->scq1 = NULL; + card->scq2 = NULL; card->scq0 = get_scq(VBR_SCQSIZE, NS_VRSCD0); - if (card->scq0 == (scq_info *) NULL) + if (card->scq0 == NULL) { printk("nicstar%d: can't get SCQ0.\n", i); error = 12; @@ -993,24 +993,24 @@ static scq_info *get_scq(int size, u32 scd) int i; if (size != VBR_SCQSIZE && size != CBR_SCQSIZE) - return (scq_info *) NULL; + return NULL; scq = (scq_info *) kmalloc(sizeof(scq_info), GFP_KERNEL); - if (scq == (scq_info *) NULL) - return (scq_info *) NULL; + if (scq == NULL) + return NULL; scq->org = kmalloc(2 * size, GFP_KERNEL); if (scq->org == NULL) { kfree(scq); - return (scq_info *) NULL; + return NULL; } scq->skb = (struct sk_buff **) kmalloc(sizeof(struct sk_buff *) * (size / NS_SCQE_SIZE), GFP_KERNEL); - if (scq->skb == (struct sk_buff **) NULL) + if (scq->skb == NULL) { kfree(scq->org); kfree(scq); - return (scq_info *) NULL; + return NULL; } scq->num_entries = size / NS_SCQE_SIZE; scq->base = (ns_scqe *) ALIGN_ADDRESS(scq->org, size); @@ -1498,7 +1498,7 @@ static int ns_open(struct atm_vcc *vcc) vc->cbr_scd = NS_FRSCD + frscdi * NS_FRSCD_SIZE; scq = get_scq(CBR_SCQSIZE, vc->cbr_scd); - if (scq == (scq_info *) NULL) + if (scq == NULL) { PRINTK("nicstar%d: can't get fixed rate SCQ.\n", card->index); card->scd2vc[frscdi] = NULL; |