Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resources: fix call to alignf() in allocate_resource()
The second parameter to alignf() in allocate_resource() must reflect what new resource is attempted to be allocated, else functions like pcibios_align_resource() (at least on x86) or pcmcia_align() can't work correctly. Commit 1e5ad96 broke this by setting the "new" resource until we're about to return success. To keep the resource untouched when allocate_resource() fails, a "tmp" resource is introduced. Signed-off-by: Dominik Brodowski <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Jesse Barnes <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information