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

Commit 200094ad authored by Matt Wagantall's avatar Matt Wagantall
Browse files

of/pci: fix sleeping from atomic context in pci_register_io_range()



pci_register_io_range() holds a spinlock while calling kzalloc() with
GFP_KERNEL. Avoid this by using GFP_ATOMIC.

Change-Id: I49a6a2b89ed797770413e0a52cea3506a1663d79
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent 66f4f85a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -707,7 +707,7 @@ int __weak pci_register_io_range(phys_addr_t addr, resource_size_t size)
	}

	/* add the range to the list */
	range = kzalloc(sizeof(*range), GFP_KERNEL);
	range = kzalloc(sizeof(*range), GFP_ATOMIC);
	if (!range) {
		err = -ENOMEM;
		goto end_register;