diff mbox series

[-next] drm/i915/display: remove redundant NULL check

Message ID 20210409125151.9520-1-linqiheng@huawei.com (mailing list archive)
State New
Headers show
Series [-next] drm/i915/display: remove redundant NULL check | expand

Commit Message

Qiheng Lin April 9, 2021, 12:51 p.m. UTC
Fix the following coccicheck warning:

drivers/gpu/drm/i915/display/intel_psr.c:1530:29-31: WARNING
 !A || A && B is equivalent to !A || B

Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 32d3d56259c2..4cec6b4d7fb9 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1526,8 +1526,7 @@  void intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state)
 		u32 psr_status;
 
 		mutex_lock(&intel_dp->psr.lock);
-		if (!intel_dp->psr.enabled ||
-		    (intel_dp->psr.enabled && intel_dp->psr.psr2_enabled)) {
+		if (!intel_dp->psr.enabled || intel_dp->psr.psr2_enabled) {
 			mutex_unlock(&intel_dp->psr.lock);
 			continue;
 		}