Jakob Koschel 23d741b490 powerpc/sysdev: fix incorrect use to determine if list is empty
[ Upstream commit fa1321b11bd01752f5be2415e74a0e1a7c378262 ]

'gtm' will *always* be set by list_for_each_entry().
It is incorrect to assume that the iterator value will be NULL if the
list is empty.

Instead of checking the pointer it should be checked if
the list is empty.

Fixes: 83ff9dcf375c ("powerpc/sysdev: implement FSL GTM support")
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220228142434.576226-1-jakobkoschel@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-20 09:06:35 +02:00
..
2016-09-20 20:57:12 +10:00
2017-12-14 09:28:21 +01:00
2016-09-20 20:57:12 +10:00
2016-09-20 20:57:12 +10:00
2016-09-20 20:57:12 +10:00
2016-03-04 23:50:27 -06:00
2016-03-04 23:50:27 -06:00
2013-10-09 20:04:11 -05:00
2016-09-20 20:57:12 +10:00
2013-11-06 14:13:50 +11:00
2014-09-25 23:14:46 +10:00