soc: aspeed: lpc-snoop: Ensure model_data is valid
authorAndrew Jeffery <andrew@codeconstruct.com.au>
Mon, 16 Jun 2025 13:13:40 +0000 (22:43 +0930)
committerAndrew Jeffery <andrew@codeconstruct.com.au>
Tue, 8 Jul 2025 02:05:03 +0000 (11:35 +0930)
commit3795e993931f2120bf64b8cdf03bb8c4f988b920
treea9afe5f0d5e5622126748162aa34acb3fc9d77d3
parent56448e78a6bb4e1a8528a0e2efe94eff0400c247
soc: aspeed: lpc-snoop: Ensure model_data is valid

of_device_get_match_data() can return NULL, though shouldn't in current
circumstances. Regardless, initialise model_data closer to use so it's
clear we need to test for validity prior to dereferencing.

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