aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall2018-01-27 08:28:15 -0600
committerGreg Kroah-Hartman2018-02-22 08:44:59 -0600
commit0bb10b1679e2b5c817ad11354345c1d73121997b (patch)
tree507e4f4f1f54a66b6ac72e12be9961e380ba99ab
parentff891875c1a079c55cb5def525c2448c4cbed98c (diff)
downloadkernel-omap-0bb10b1679e2b5c817ad11354345c1d73121997b.tar.gz
kernel-omap-0bb10b1679e2b5c817ad11354345c1d73121997b.tar.xz
kernel-omap-0bb10b1679e2b5c817ad11354345c1d73121997b.zip
drm/radeon: adjust tested variable
commit 3a61b527b4e1f285d21b6e9e623dc45cf8bb391f upstream. Check the variable that was most recently initialized. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x, y, f, g, e, m; statement S1,S2,S3,S4; @@ x = f(...); if (\(<+...x...+>\&e\)) S1 else S2 ( x = g(...); | m = g(...,&x,...); | y = g(...); *if (e) S3 else S4 ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/radeon/radeon_uvd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
index 6edcb5485092..b35ebabd6a9f 100644
--- a/drivers/gpu/drm/radeon/radeon_uvd.c
+++ b/drivers/gpu/drm/radeon/radeon_uvd.c
@@ -946,7 +946,7 @@ int radeon_uvd_calc_upll_dividers(struct radeon_device *rdev,
946 /* calc dclk divider with current vco freq */ 946 /* calc dclk divider with current vco freq */
947 dclk_div = radeon_uvd_calc_upll_post_div(vco_freq, dclk, 947 dclk_div = radeon_uvd_calc_upll_post_div(vco_freq, dclk,
948 pd_min, pd_even); 948 pd_min, pd_even);
949 if (vclk_div > pd_max) 949 if (dclk_div > pd_max)
950 break; /* vco is too big, it has to stop */ 950 break; /* vco is too big, it has to stop */
951 951
952 /* calc score with current vco freq */ 952 /* calc score with current vco freq */