Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1313045

[patch] drm: rockchip: signedness bug in dw_mipi_dsi_get_lane_bps()

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject [patch] drm: rockchip: signedness bug in dw_mipi_dsi_get_lane_bps()
Date 2016-01-20 11:00 +0100
Message-ID <qSXIu-4Bq-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


"bpp" needs to be signed for the error handling to work.

Fixes: 84e05408fcfe ('drm: rockchip: Support Synopsys DW MIPI DSI')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
index 7bfe243..c35e5af 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
@@ -461,7 +461,8 @@ static int dw_mipi_dsi_phy_init(struct dw_mipi_dsi *dsi)
 
 static int dw_mipi_dsi_get_lane_bps(struct dw_mipi_dsi *dsi)
 {
-	unsigned int bpp, i, pre;
+	int bpp;
+	unsigned int i, pre;
 	unsigned long mpclk, pllref, tmp;
 	unsigned int m = 1, n = 1, target_mbps = 1000;
 	unsigned int max_mbps = dptdin_map[ARRAY_SIZE(dptdin_map) - 1].max_mbps;

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[patch] drm: rockchip: signedness bug in dw_mipi_dsi_get_lane_bps() Dan Carpenter <dan.carpenter@oracle.com> - 2016-01-20 11:00 +0100
  Re: [patch] drm: rockchip: signedness bug in dw_mipi_dsi_get_lane_bps() Heiko Stuebner <heiko@sntech.de> - 2016-01-21 00:20 +0100

csiph-web