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

Commit 9667042c authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman
Browse files

dp83640: reverse arguments to list_add_tail



[ Upstream commit 865308373ed49c9fb05720d14cbf1315349b32a9 ]

In this code, it appears that phyter_clocks is a list head, based on
the previous list_for_each, and that clock->list is intended to be a
list element, given that it has just been initialized in
dp83640_clock_init.  Accordingly, switch the arguments to
list_add_tail, which takes the list head as the second argument.

Fixes: cb646e2b ("ptp: Added a clock driver for the National Semiconductor PHYTER.")
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a3da2984
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1114,7 +1114,7 @@ static struct dp83640_clock *dp83640_clock_get_bus(struct mii_bus *bus)
		goto out;
		goto out;
	}
	}
	dp83640_clock_init(clock, bus);
	dp83640_clock_init(clock, bus);
	list_add_tail(&phyter_clocks, &clock->list);
	list_add_tail(&clock->list, &phyter_clocks);
out:
out:
	mutex_unlock(&phyter_clocks_lock);
	mutex_unlock(&phyter_clocks_lock);