]> git.hungrycats.org Git - linux/commitdiff
[PATCH] PCI: insert_resource can succeed and return an error
authorMatthew Wilcox <willy@debian.org>
Fri, 19 Mar 2004 06:07:09 +0000 (22:07 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 19 Mar 2004 06:07:09 +0000 (22:07 -0800)
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?

kernel/resource.c

index 001c96e1908425a5797b30f372893b84a155d933..f7a704e88bd1be85e457cb3c6a1b1f5b1825df3d 100644 (file)
@@ -335,6 +335,7 @@ int insert_resource(struct resource *parent, struct resource *new)
        /* existing resource overlaps end of new resource */
        if (next->end > new->end) {
                parent = next;
+               result = 0;
                goto begin;
        }