From: Grant Likely <grant.likely@secretlab.ca>
Labels and gotos are used in xilinxfb_assign to unwind allocations
on device registration failures. Rename the labels to reflect the
error which occured. This change is being made to make it easier
to add new failout paths (which occurs in a subsuquent patch) and
to make reviewing the failout path easier.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/video/xilinxfb.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index e63cbd1..9aa754a 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -225,14 +225,14 @@ xilinxfb_drv_probe(struct device *dev)
if (!regs_res || (regs_res->end - regs_res->start + 1 < 8)) {
dev_err(dev, "Couldn't get registers resource\n");
retval = -EFAULT;
- goto failed1;
+ goto err_region;
}
if (!request_mem_region(regs_res->start, 8, DRIVER_NAME)) {
dev_err(dev, "Couldn't lock memory region at 0x%08X\n",
regs_res->start);
retval = -EBUSY;
- goto failed1;
+ goto err_region;
}
drvdata->regs = (u32 __iomem*) ioremap(regs_res->start, 8);
drvdata->regs_phys = regs_res->start;
@@ -243,7 +243,7 @@ xilinxfb_drv_probe(struct device *dev)
if (!drvdata->fb_virt) {
dev_err(dev, "Could not allocate frame buffer memory\n");
retval = -ENOMEM;
- goto failed2;
+ goto err_fbmem;
}
/* Clear (turn to black) the framebuffer */
@@ -270,7 +270,7 @@ xilinxfb_drv_probe(struct device *dev)
dev_err(dev, "Fail to allocate colormap (%d entries)\n",
PALETTE_ENTRIES_NO);
retval = -EFAULT;
- goto failed3;
+ goto err_cmap;
}
drvdata->info.flags = FBINFO_DEFAULT;
@@ -284,7 +284,7 @@ xilinxfb_drv_probe(struct device *dev)
if (register_framebuffer(&drvdata->info) < 0) {
dev_err(dev, "Could not register frame buffer\n");
retval = -EINVAL;
- goto failed4;
+ goto err_regfb;
}
/* Put a banner in the log (for DEBUG) */
@@ -294,10 +294,10 @@ xilinxfb_drv_probe(struct device *dev)
(void*)drvdata->fb_phys, drvdata->fb_virt, FB_SIZE);
return 0; /* success */
-failed4:
+err_regfb:
fb_dealloc_cmap(&drvdata->info.cmap);
-failed3:
+err_cmap:
dma_free_coherent(dev, PAGE_ALIGN(FB_SIZE), drvdata->fb_virt,
drvdata->fb_phys);
@@ -305,10 +305,10 @@ failed3:
xilinx_fb_out_be32(drvdata, REG_CTRL, 0);
iounmap(drvdata->regs);
-failed2:
+err_fbmem:
release_mem_region(regs_res->start, 8);
-failed1:
+err_region:
kfree(drvdata);
dev_set_drvdata(dev, NULL);
-
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Glauber de Oliveira Costa | [PATCH 0/19] desc_struct integration |
| Paolo Ornati | Re: [patch 00/69] -stable review |
| Ingo Molnar | [patch] CFS scheduler, -v6 |
git: | |
| Denis Bueno | git-instaweb portability issue (maybe?) |
| Jon Smirl | Re: Inconsistencies with git log |
| Johannes Schindelin | Re: [PATCH] Fix premature call to git_config() causing t1020-subdirectory to fail |
| Dan Farina | backup or mirror a repository |
| Marc Espie | Re: That whole "Linux stealing our code" thing |
| Ray Percival | Re: Real men don't attack straw men |
| askthelist | Packets Per Second Limit? |
| Didier Wiroth | how can I "find xyz | xargs tar" ... like gtar |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| Giacomo A. Catenazzi | Re: [BUG] New Kernel Bugs |
| Tilman Schmidt | Re: 2.6.25-rc8: FTP transfer errors |
| Ingo Oeser | Re: [PATCH]: Third (final?) release of Sun Neptune driver |
| high memory | 10 hours ago | Linux kernel |
| semaphore access speed | 13 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 14 hours ago | Linux kernel |
| Easter Eggs in windows XP | 16 hours ago | Windows |
| Shared swap partition | 17 hours ago | Linux general |
| Root password | 18 hours ago | Linux general |
| Where/when DNOTIFY is used? | 19 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 22 hours ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 22 hours ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 1 day ago | Linux general |
