[PATCH -next] drm/amd/display: Delete redundant null check for 'steam' and 'plane'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since commit 15c2990e0f01 ("drm/amd/display: Add null checks for
'stream' and 'plane' before dereferencing"), the
dcn30_apply_idle_power_optimizations() function would return
if these veriables would be null. So no need to check again before
using them.

Signed-off-by: Wang Wensheng <wangwensheng4@xxxxxxxxxx>
---
 drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
index eaeeade31ed7..ffc35a5653fd 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
@@ -925,11 +925,9 @@ bool dcn30_apply_idle_power_optimizations(struct dc *dc, bool enable)
 			if (!stream || !plane)
 				return false;
 
-			if (stream && plane) {
-				cursor_cache_enable = stream->cursor_position.enable &&
-						plane->address.grph.cursor_cache_addr.quad_part;
-				cursor_attr = stream->cursor_attributes;
-			}
+			cursor_cache_enable = stream->cursor_position.enable &&
+					plane->address.grph.cursor_cache_addr.quad_part;
+			cursor_attr = stream->cursor_attributes;
 
 			/*
 			 * Second, check MALL eligibility
-- 
2.17.1




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux