xen: events: fix xen_map_pirq_gsi error return
authorIan Campbell <ian.campbell@citrix.com>
Thu, 10 Mar 2011 16:08:03 +0000 (16:08 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 10 Mar 2011 19:48:34 +0000 (14:48 -0500)
Fix initial value of irq so that first goto out (if pirq or gsi
arguments are too large) actually returns an error.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/events.c

index 0b27080b1918d2aa156838d2376c8791eb152c37..a9c154d1d2ff0f3a4782316cbb0f62915dbb8180 100644 (file)
@@ -592,7 +592,7 @@ int xen_allocate_pirq(unsigned gsi, int shareable, char *name)
  */
 int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name)
 {
-       int irq = 0;
+       int irq = -1;
        struct physdev_irq irq_op;
 
        spin_lock(&irq_mapping_update_lock);