Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7719aba7 authored by Daniel Axtens's avatar Daniel Axtens Committed by Greg Kroah-Hartman
Browse files

powerpc/eeh: Small refactor of eeh_handle_normal_event()



[ Upstream commit 10b34ece132ee46dc4e6459c765d180c422a09fa ]

The control flow of eeh_handle_normal_event() is a bit tricky.

Break out one of the error handling paths - rather than be in an else
block, we'll make it part of the regular body of the function and put a
'goto out;' in the true limb of the if.

Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211015070628.1331635-1-dja@axtens.net


Stable-dep-of: 9efcdaac36e1 ("powerpc/eeh: Set channel state after notifying the drivers")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a39becb9
Loading
Loading
Loading
Loading
+35 −34
Original line number Diff line number Diff line
@@ -1072,7 +1072,9 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
		}

		pr_info("EEH: Recovery successful.\n");
	} else  {
		goto out;
	}

	/*
	 * About 90% of all real-life EEH failures in the field
	 * are due to poorly seated PCI cards. Only 10% or so are
@@ -1111,7 +1113,6 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
		/* The passed PE should no longer be used */
		return;
	}
	}

out:
	/*