Commit 2faec55c authored by zhong jiang's avatar zhong jiang Committed by Alex Deucher
Browse files

drm/amd/display: remove redundant null pointer check before kfree



kfree has taken the null pointer into account. hence it is safe
to remove the redundant null pointer check before kfree.

Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 505f8dbb
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -186,12 +186,8 @@ void mod_stats_destroy(struct mod_stats *mod_stats)
	if (mod_stats != NULL) {
		struct core_stats *core_stats = MOD_STATS_TO_CORE(mod_stats);

		if (core_stats->time != NULL)
		kfree(core_stats->time);

		if (core_stats->events != NULL)
		kfree(core_stats->events);

		kfree(core_stats);
	}
}