All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
@ 2017-10-24  9:44 ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2017-10-24  9:44 UTC (permalink / raw)
  To: Alex Deucher, Rex Zhu
  Cc: David Airlie, kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Huang Rui,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Eric Huang,
	Christian König

We accidentally inverted an if statement and turned amd_powerplay_reset()
into a no-op.

Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
IMHO, tidying unreadable double negatives is tricky and error prone but
still worth it in the long run.

diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 3c8ef4bfc205..0f8b6dc853a5 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1184,7 +1184,7 @@ int amd_powerplay_reset(void *handle)
 	int ret;
 
 	ret = pp_check(instance);
-	if (!ret)
+	if (ret)
 		return ret;
 
 	ret = pp_hw_fini(instance);
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2017-10-25 22:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24  9:44 [PATCH] drm/amd/powerplay: fix amd_powerplay_reset() Dan Carpenter
2017-10-24  9:44 ` Dan Carpenter
2017-10-24 10:11 ` Jani Nikula
2017-10-24 10:11   ` Jani Nikula
2017-10-24 10:31   ` Dan Carpenter
2017-10-24 10:31     ` Dan Carpenter
2017-10-25 22:28 ` Alex Deucher
2017-10-25 22:28   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.