Skip to content

Commit 486e487

Browse files
Nikolai-LCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 4292e02 commit 486e487

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

kernel/realsense/d4xx.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,7 +2959,8 @@ static int ds5_hw_reset_with_recovery(struct ds5 *state)
29592959
*
29602960
* Natural-recovery path: perform a lightweight stability gate
29612961
* (2 reads, 100ms apart). This catches the FW secondary init
2962-
* window that can occur in parallel with Step 1/early ready checks.
2962+
* window that can occur in parallel with the earlier readiness
2963+
* checks (Steps 5 and 7–9).
29632964
* If any probe fails, run Phase 1 SERDES recovery and continue with
29642965
* the full Step 10 verification loop.
29652966
*
@@ -2985,10 +2986,12 @@ static int ds5_hw_reset_with_recovery(struct ds5 *state)
29852986
"%s(): natural recovery stability probe failed (ret=%d, val=0x%x), running Phase 1 SERDES recovery\n",
29862987
__func__, ret, natural_val);
29872988
ret = ds5_hw_reset_serdes_recovery(state, false);
2988-
if (ret < 0)
2989+
if (ret < 0) {
29892990
dev_err(&state->client->dev,
29902991
"%s(): Phase 1 recovery from natural path failed: %d\n",
29912992
__func__, ret);
2993+
return ret;
2994+
}
29922995
serdes_recovery_ran = true;
29932996
} else {
29942997
dev_info(&state->client->dev,

0 commit comments

Comments
 (0)