mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 06:56:41 +07:00
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: zhong jiang <zhongjiang@huawei.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
505f8dbb6a
commit
2faec55c4d
@ -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->time);
|
||||
kfree(core_stats->events);
|
||||
kfree(core_stats);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user