'pcibios_fwaddrmap_lookup()' is used to maintain FW-assigned BIOS BAR
values for reinstatement when normal resource assignment attempts
fail and must be called with the 'pcibios_fwaddrmap_lock' spinlock
held.
This patch adds a WARN_ON notification if the spinlock is not currently
held by the caller.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
{
struct pcibios_fwaddrmap *map;
+ WARN_ON(!spin_is_locked(&pcibios_fwaddrmap_lock));
+
list_for_each_entry(map, &pcibios_fwaddrmappings, list)
if (map->dev == dev)
return map;