diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0399-drm-amd-display-remove-redundant-null-pointer-check-.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/0399-drm-amd-display-remove-redundant-null-pointer-check-.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0399-drm-amd-display-remove-redundant-null-pointer-check-.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0399-drm-amd-display-remove-redundant-null-pointer-check-.patch new file mode 100644 index 00000000..aaf0b1fe --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0399-drm-amd-display-remove-redundant-null-pointer-check-.patch @@ -0,0 +1,37 @@ +From abee6bc41ec039e122728fbd73e1658123b54039 Mon Sep 17 00:00:00 2001 +From: zhong jiang <zhongjiang@huawei.com> +Date: Fri, 21 Sep 2018 21:12:11 +0800 +Subject: [PATCH 0399/2940] 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> +--- + drivers/gpu/drm/amd/display/modules/stats/stats.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/modules/stats/stats.c b/drivers/gpu/drm/amd/display/modules/stats/stats.c +index 3d4c1b1ab8c4..03121ca64fe4 100644 +--- a/drivers/gpu/drm/amd/display/modules/stats/stats.c ++++ b/drivers/gpu/drm/amd/display/modules/stats/stats.c +@@ -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); + } + } +-- +2.17.1 + |