From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Date: Mon, 25 Dec 2023 17:54:33 +0100 Move one assignment for a local variable so that its setting will only be performed immediately before this pointer is used. Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> --- drivers/edac/amd64_edac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 698cde573847..91e0abdf762f 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -4263,7 +4263,7 @@ static bool instance_has_memory(struct amd64_pvt *pvt) static int probe_one_instance(unsigned int nid) { - struct pci_dev *F3 = node_to_amd_nb(nid)->misc; + struct pci_dev *F3; struct amd64_pvt *pvt; struct ecc_settings *s; int ret; @@ -4281,6 +4281,7 @@ static int probe_one_instance(unsigned int nid) } pvt->mc_node_id = nid; + F3 = node_to_amd_nb(nid)->misc; pvt->F3 = F3; ret = per_family_init(pvt); -- 2.43.0