aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-08-08 13:50:18 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-14 15:24:29 -0400
commitc11cda52193dfa459dfea38f00b19bc9325fa922 (patch)
treebcfbe1fe91624fc1e1ac966108a58218cd0be2cf
parent295ee85316aedfe1878306d71b5e9c7d4498fb1b (diff)
drm: Don't return 0 for a value used as a denominator
Static analysis will be unhappy if a function can theoretically return 0 and we're trying to divide by that value. Mark that case that cannot occur as a BUG() instead. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/drm_dp_mst_topology.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 352f5d6c763c..b3adf1445020 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -1772,7 +1772,7 @@ static int drm_dp_get_vc_payload_bw(int dp_link_bw, int dp_link_count)
1772 case DP_LINK_BW_5_4: 1772 case DP_LINK_BW_5_4:
1773 return 10 * dp_link_count; 1773 return 10 * dp_link_count;
1774 } 1774 }
1775 return 0; 1775 BUG();
1776} 1776}
1777 1777
1778/** 1778/**