]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe: fix unbalanced rpm put() with declare_wedged()
authorMatthew Auld <matthew.auld@intel.com>
Wed, 9 Oct 2024 08:48:10 +0000 (09:48 +0100)
committerLucas De Marchi <lucas.demarchi@intel.com>
Wed, 16 Oct 2024 14:00:22 +0000 (09:00 -0500)
commit761f916af44279a99db4e78c5f5ee839b31107ea
treef4bb089608875a85d0ef0ea8f964d984c27fcfc2
parent03a86c24aea0920a1ca20a0d7771d5e176db538d
drm/xe: fix unbalanced rpm put() with declare_wedged()

Technically the or_reset() means we call the action on failure, however
that would lead to unbalanced rpm put(). Move the get() earlier to fix
this. It should be extremely unlikely to ever trigger this in practice.

Fixes: 90936a0a4c54 ("drm/xe: Don't suspend device upon wedge")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241009084808.204432-4-matthew.auld@intel.com
(cherry picked from commit a187c1b0a800565a4db6372268692aff99df7f53)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_device.c