mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] radeon: Fix wrong boolean operator
@ 2011-01-28 22:35 Stefan Weil
  2011-01-28 23:03 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2011-01-28 22:35 UTC (permalink / raw)
  To: David Airlie
  Cc: Stefan Weil, David Airlie, Alex Deucher, dri-devel, linux-kernel

This error is reported by cppcheck:
drivers/gpu/drm/radeon/radeon_encoders.c:1066: warning: Mutual exclusion over || always evaluates to true. Did you intend to use && instead?

It looks like cppcheck is correct, so fix this. No test was run.

Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 drivers/gpu/drm/radeon/radeon_encoders.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index 5e90984..d4a5422 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -1063,7 +1063,7 @@ atombios_set_edp_panel_power(struct drm_connector *connector, int action)
 	if (!ASIC_IS_DCE4(rdev))
 		return;
 
-	if ((action != ATOM_TRANSMITTER_ACTION_POWER_ON) ||
+	if ((action != ATOM_TRANSMITTER_ACTION_POWER_ON) &&
 	    (action != ATOM_TRANSMITTER_ACTION_POWER_OFF))
 		return;
 
-- 
1.7.2.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-28 23:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 22:35 [PATCH] radeon: Fix wrong boolean operator Stefan Weil
2011-01-28 23:03 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®