Skip to content

Commit

Permalink
[IRDA]: Do not do pointless kmalloc return value cast in KingSun driver
Browse files Browse the repository at this point in the history
kmalloc() returns a void pointer, so there is no need to cast it in
 drivers/net/irda/kingsun-sir.c::kingsun_probe().

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jesper Juhl authored and David S. Miller committed Aug 27, 2007
1 parent aaa53c4 commit 901ded2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/irda/kingsun-sir.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,12 +509,12 @@ static int kingsun_probe(struct usb_interface *intf,
spin_lock_init(&kingsun->lock);

/* Allocate input buffer */
kingsun->in_buf = (__u8 *)kmalloc(kingsun->max_rx, GFP_KERNEL);
kingsun->in_buf = kmalloc(kingsun->max_rx, GFP_KERNEL);
if (!kingsun->in_buf)
goto free_mem;

/* Allocate output buffer */
kingsun->out_buf = (__u8 *)kmalloc(KINGSUN_FIFO_SIZE, GFP_KERNEL);
kingsun->out_buf = kmalloc(KINGSUN_FIFO_SIZE, GFP_KERNEL);
if (!kingsun->out_buf)
goto free_mem;

Expand Down

0 comments on commit 901ded2

Please sign in to comment.