summaryrefslogtreecommitdiffstats
path: root/drivers/of/of_reserved_mem.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-14 04:20:27 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-14 04:20:27 +0100
commit252ca494ac75f0dc47469f130d6dc67ed14081f4 (patch)
tree159e9931af199f8acf50f9982f281ee69ceb7cbf /drivers/of/of_reserved_mem.c
parentusb: ehci: ohci: fix bool assignments (diff)
parentLinux 4.4-rc5 (diff)
downloadlinux-252ca494ac75f0dc47469f130d6dc67ed14081f4.tar.xz
linux-252ca494ac75f0dc47469f130d6dc67ed14081f4.zip
Merge 4.4-rc5 into usb-next as we want those fixes here for testing
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/of/of_reserved_mem.c')
-rw-r--r--drivers/of/of_reserved_mem.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index be77e75c587d..1a3556a9e9ea 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -206,7 +206,13 @@ static int __init __rmem_cmp(const void *a, const void *b)
{
const struct reserved_mem *ra = a, *rb = b;
- return ra->base - rb->base;
+ if (ra->base < rb->base)
+ return -1;
+
+ if (ra->base > rb->base)
+ return 1;
+
+ return 0;
}
static void __init __rmem_check_for_overlap(void)