As most members of syscall_stats is set to 0 in thread__update_stats,
using zalloc() directly.
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220908021141.27134-2-shangxiaojing@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 
        stats = inode->priv;
        if (stats == NULL) {
-               stats = malloc(sizeof(*stats));
+               stats = zalloc(sizeof(*stats));
                if (stats == NULL)
                        return;
 
-               stats->nr_failures = 0;
-               stats->max_errno   = 0;
-               stats->errnos      = NULL;
                init_stats(&stats->stats);
                inode->priv = stats;
        }