From: Jesper Juhl Date: Thu, 23 Aug 2007 23:40:26 +0000 (+0200) Subject: [IA64] Remove unnecessary cast of allocation return value in sn_hwperf_enum_objects() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1aac0b5739ae192ee812eee09625ebfc08c2d760;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [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 Signed-off-by: Tony Luck --- diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index df8d5bed6119..1a8e49607f11 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/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;