linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/video/xen-fbfront.c: add missing cleanup code
@ 2012-04-22  9:57 Julia Lawall
  2012-04-26 21:42 ` [Xen-devel] " Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2012-04-22  9:57 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: kernel-janitors, Jeremy Fitzhardinge, Florian Tobias Schandinat,
	xen-devel, virtualization, linux-fbdev, linux-kernel

From: Julia Lawall <Julia.Lawall@lip6.fr>

The operations in the subsequent error-handling code appear to be also
useful here.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
Not tested.

 drivers/video/xen-fbfront.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c
index cb4529c..b0bd59c 100644
--- a/drivers/video/xen-fbfront.c
+++ b/drivers/video/xen-fbfront.c
@@ -458,8 +458,13 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
 	xenfb_init_shared_page(info, fb_info);
 
 	ret = xenfb_connect_backend(dev, info);
-	if (ret < 0)
+	if (ret < 0) {
+		fb_deferred_io_cleanup(fb_info);
+		fb_dealloc_cmap(&fb_info->cmap);
+		framebuffer_release(fb_info);
+		xenbus_dev_fatal(dev, ret, "xenfb_connect_backend");
 		goto error;
+	}
 
 	ret = register_framebuffer(fb_info);
 	if (ret) {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-28 23:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-22  9:57 [PATCH] drivers/video/xen-fbfront.c: add missing cleanup code Julia Lawall
2012-04-26 21:42 ` [Xen-devel] " Konrad Rzeszutek Wilk
2012-04-28 23:47   ` Florian Tobias Schandinat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).