Przeglądaj źródła

[IA64] Remove unnecessary cast of allocation return value in sn_hwperf_enum_objects()

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>
Jesper Juhl 18 lat temu
rodzic
commit
1aac0b5739
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      arch/ia64/sn/kernel/sn2/sn_hwperf.c

+ 2 - 1
arch/ia64/sn/kernel/sn2/sn_hwperf.c

@@ -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;