From d4076a1e3c21bdbe9201d7f4c27e70b679dbca13 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 22 Nov 2010 08:29:03 +0000 Subject: event_channel: Fix uninitialised variable build error. Signed-off-by: Yang Zhang Signed-off-by: Keir Fraser --- xen/common/event_channel.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'xen/common/event_channel.c') diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 52ec7fc215..c4308ed8f7 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -345,15 +345,14 @@ static long evtchn_bind_pirq(evtchn_bind_pirq_t *bind) chn = evtchn_from_port(d, port); d->pirq_to_evtchn[pirq] = port; - if ( !is_hvm_domain(d) ) + rc = (!is_hvm_domain(d) + ? pirq_guest_bind( + v, pirq, !!(bind->flags & BIND_PIRQ__WILL_SHARE)) + : 0); + if ( rc != 0 ) { - rc = pirq_guest_bind( - v, pirq, !!(bind->flags & BIND_PIRQ__WILL_SHARE)); - if ( rc != 0 ) - { - d->pirq_to_evtchn[pirq] = 0; - goto out; - } + d->pirq_to_evtchn[pirq] = 0; + goto out; } chn->state = ECS_PIRQ; -- cgit v1.2.3