[NET]: Remove unneeded kmalloc() return value casts
authorJesper Juhl <jesper.juhl@gmail.com>
Tue, 10 Jan 2006 21:08:21 +0000 (13:08 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Jan 2006 21:08:21 +0000 (13:08 -0800)
Get rid of needless casting of kmalloc() return value in net/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bluetooth/hci_conn.c
net/sunrpc/svc.c

index a31244e58888c39d4cab34eb082c36b53fe40ec9..f812ed129e589cc1929bdf06830eef5f60243006 100644 (file)
@@ -403,7 +403,7 @@ int hci_get_conn_list(void __user *arg)
 
        size = sizeof(req) + req.conn_num * sizeof(*ci);
 
-       if (!(cl = (void *) kmalloc(size, GFP_KERNEL)))
+       if (!(cl = kmalloc(size, GFP_KERNEL)))
                return -ENOMEM;
 
        if (!(hdev = hci_dev_get(req.dev_id))) {
index b19cc26fa9c24b9457c38d5bdabd37f2295e41c2..a8bd34d47425460a75ba871356625a13203865e6 100644 (file)
@@ -166,8 +166,8 @@ svc_create_thread(svc_thread_fn func, struct svc_serv *serv)
        memset(rqstp, 0, sizeof(*rqstp));
        init_waitqueue_head(&rqstp->rq_wait);
 
-       if (!(rqstp->rq_argp = (u32 *) kmalloc(serv->sv_xdrsize, GFP_KERNEL))
-        || !(rqstp->rq_resp = (u32 *) kmalloc(serv->sv_xdrsize, GFP_KERNEL))
+       if (!(rqstp->rq_argp = kmalloc(serv->sv_xdrsize, GFP_KERNEL))
+        || !(rqstp->rq_resp = kmalloc(serv->sv_xdrsize, GFP_KERNEL))
         || !svc_init_buffer(rqstp, serv->sv_bufsz))
                goto out_thread;