[IA64] Remove unnecessary cast of allocation return value in sn_hwperf_enum_objects()
authorJesper Juhl <jesper.juhl@gmail.com>
Thu, 23 Aug 2007 23:40:26 +0000 (01:40 +0200)
committerTony Luck <tony.luck@intel.com>
Sat, 1 Sep 2007 09:48:45 +0000 (02:48 -0700)
vmalloc() returns a void pointer - no need to cast it.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/sn/kernel/sn2/sn_hwperf.c

index df8d5bed6119f210f7e5d2b234654536000a7168..1a8e49607f114e7febdcaa51913bf54527893617 100644 (file)
@@ -66,7 +66,8 @@ static int sn_hwperf_enum_objects(int *nobj, struct sn_hwperf_object_info **ret)
        }
 
        sz = sn_hwperf_obj_cnt * sizeof(struct sn_hwperf_object_info);
-       if ((objbuf = (struct sn_hwperf_object_info *) vmalloc(sz)) == NULL) {
+       objbuf = vmalloc(sz);
+       if (objbuf == NULL) {
                printk("sn_hwperf_enum_objects: vmalloc(%d) failed\n", (int)sz);
                e = -ENOMEM;
                goto out;