Commit 78b21ca0 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Greg Kroah-Hartman

[PATCH] PCI: insert_resource can succeed and return an error

If we start again, we can return an error even if we were successful.
Reset the result to 0 before beginning again.  Why don't we use a
tailcall here?
parent 7509728a
...@@ -335,6 +335,7 @@ int insert_resource(struct resource *parent, struct resource *new) ...@@ -335,6 +335,7 @@ int insert_resource(struct resource *parent, struct resource *new)
/* existing resource overlaps end of new resource */ /* existing resource overlaps end of new resource */
if (next->end > new->end) { if (next->end > new->end) {
parent = next; parent = next;
result = 0;
goto begin; goto begin;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment