Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: fnic: Remove unnecessary cast

Fix the following coccicheck warning:
WARNING: casting value returned by memory allocation function is useless.

Link: https://lore.kernel.org/r/1615515500-946-1-git-send-email-wangqing@vivo.com
Signed-off-by: Wang Qing <wangqing@vivo.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Wang Qing and committed by
Martin K. Petersen
3ba9f38e 690209d5

+1 -2
+1 -2
drivers/scsi/fnic/fnic_debugfs.c
··· 58 58 fnic_trace_debugfs_root); 59 59 60 60 /* Allocate memory to structure */ 61 - fc_trc_flag = (struct fc_trace_flag_type *) 62 - vmalloc(sizeof(struct fc_trace_flag_type)); 61 + fc_trc_flag = vmalloc(sizeof(struct fc_trace_flag_type)); 63 62 64 63 if (fc_trc_flag) { 65 64 fc_trc_flag->fc_row_file = 0;