soc: aspeed: lpc-snoop: Rearrange channel paths
authorAndrew Jeffery <andrew@codeconstruct.com.au>
Mon, 16 Jun 2025 13:13:43 +0000 (22:43 +0930)
committerAndrew Jeffery <andrew@codeconstruct.com.au>
Tue, 8 Jul 2025 02:05:07 +0000 (11:35 +0930)
commit6c64e1a828a20f841f3fcfe64bca6b1437d15f21
tree58bd808e8d95b24a69360fbb0894cc13cdce8732
parente88c9a712f9acc699ee69246d838bfca95956bf3
soc: aspeed: lpc-snoop: Rearrange channel paths

Order assignments such that tests for conditions not involving resource
acquisition are ordered before those testing acquired resources, and
order managed resource acquisition before unmanaged where possible. This
way we minimise the amount of manual cleanup required.

In the process, improve readability of the code by introducing a channel
pointer that takes the place of the repeated object lookups.

Acked-by: Jean Delvare <jdelvare@suse.de>
Link: https://patch.msgid.link/20250616-aspeed-lpc-snoop-fixes-v2-6-3cdd59c934d3@codeconstruct.com.au
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
drivers/soc/aspeed/aspeed-lpc-snoop.c