Start and stop can fail, so add checks.
Fixes: b8b6e6f1654d ("drm/amd: Add per-ring reset for vcn v4.0.0 use")
Reviewed-by: Mario Limonciello <mari.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
return -EOPNOTSUPP;
drm_sched_wqueue_stop(&ring->sched);
- vcn_v4_0_stop(vinst);
- vcn_v4_0_start(vinst);
+ r = vcn_v4_0_stop(vinst);
+ if (r)
+ return r;
+ r = vcn_v4_0_start(vinst);
+ if (r)
+ return r;
r = amdgpu_ring_test_helper(ring);
if (r)