From a0e181167ee4254988c8c89d26ffd8ef4cb7deb0 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 10 Mar 2011 16:08:03 +0000 Subject: [PATCH] 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 Signed-off-by: Konrad Rzeszutek Wilk --- drivers/xen/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 0b27080b1918..a9c154d1d2ff 100644 --- a/drivers/xen/events.c +++ b/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); -- GitLab