[PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
Alex Deucher
alexdeucher at gmail.com
Wed Oct 25 22:28:37 UTC 2017
On Tue, Oct 24, 2017 at 5:44 AM, Dan Carpenter <dan.carpenter at oracle.com> wrote:
> 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 at oracle.com>
Applied. thanks!
Alex
> ---
> 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list