Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227700
b: refs/heads/master
c: fc550e9
h: refs/heads/master
v: v3
  • Loading branch information
Joe Jin authored and Konrad Rzeszutek Wilk committed Jan 10, 2011
1 parent 4656abd commit 0838ee6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 731f3ab66a23dab28a359e87364f53d221b3d366
refs/heads/master: fc550e95921e109f3778a6b2dc560d63388810ab
17 changes: 9 additions & 8 deletions trunk/drivers/video/xen-fbfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,26 +562,24 @@ static void xenfb_init_shared_page(struct xenfb_info *info,
static int xenfb_connect_backend(struct xenbus_device *dev,
struct xenfb_info *info)
{
int ret, evtchn;
int ret, evtchn, irq;
struct xenbus_transaction xbt;

ret = xenbus_alloc_evtchn(dev, &evtchn);
if (ret)
return ret;
ret = bind_evtchn_to_irqhandler(evtchn, xenfb_event_handler,
irq = bind_evtchn_to_irqhandler(evtchn, xenfb_event_handler,
0, dev->devicetype, info);
if (ret < 0) {
if (irq < 0) {
xenbus_free_evtchn(dev, evtchn);
xenbus_dev_fatal(dev, ret, "bind_evtchn_to_irqhandler");
return ret;
return irq;
}
info->irq = ret;

again:
ret = xenbus_transaction_start(&xbt);
if (ret) {
xenbus_dev_fatal(dev, ret, "starting transaction");
return ret;
goto unbind_irq;
}
ret = xenbus_printf(xbt, dev->nodename, "page-ref", "%lu",
virt_to_mfn(info->page));
Expand All @@ -603,15 +601,18 @@ static int xenfb_connect_backend(struct xenbus_device *dev,
if (ret == -EAGAIN)
goto again;
xenbus_dev_fatal(dev, ret, "completing transaction");
return ret;
goto unbind_irq;
}

xenbus_switch_state(dev, XenbusStateInitialised);
info->irq = irq;
return 0;

error_xenbus:
xenbus_transaction_end(xbt, 1);
xenbus_dev_fatal(dev, ret, "writing xenstore");
unbind_irq:
unbind_from_irqhandler(irq, info);
return ret;
}

Expand Down

0 comments on commit 0838ee6

Please sign in to comment.