Explorar o código

xen: events: fix xen_map_pirq_gsi error return

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>
Ian Campbell %!s(int64=15) %!d(string=hai) anos
pai
achega
a0e181167e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/xen/events.c

+ 1 - 1
drivers/xen/events.c

@@ -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);