[PATCH 6/6] GPU-DRM-GMA500: Rename a jump label in mid_get_vbt_data()
SF Markus Elfring
elfring at users.sourceforge.net
Tue Sep 20 09:01:50 UTC 2016
From: Markus Elfring <elfring at users.sourceforge.net>
Date: Tue, 20 Sep 2016 10:40:22 +0200
* Adjust a jump target.
* Delete the explicit initialisation for the local variable "ret"
which became unnecessary with this refactoring.
Signed-off-by: Markus Elfring <elfring at users.sourceforge.net>
---
drivers/gpu/drm/gma500/mid_bios.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c
index e5cece0..602d16f 100644
--- a/drivers/gpu/drm/gma500/mid_bios.c
+++ b/drivers/gpu/drm/gma500/mid_bios.c
@@ -284,7 +284,7 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv)
u8 __iomem *vbt_virtual;
struct mid_vbt_header vbt_header;
struct pci_dev *pci_gfx_root = pci_get_bus_and_slot(0, PCI_DEVFN(2, 0));
- int ret = -1;
+ int ret;
/* Get the address of the platform config vbt */
pci_read_config_dword(pci_gfx_root, 0xFC, &addr);
@@ -293,18 +293,18 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv)
dev_dbg(dev->dev, "drm platform config address is %x\n", addr);
if (!addr)
- goto out;
+ goto report_failure;
/* get the virtual address of the vbt */
vbt_virtual = ioremap(addr, sizeof(vbt_header));
if (!vbt_virtual)
- goto out;
+ goto report_failure;
memcpy_fromio(&vbt_header, vbt_virtual, sizeof(vbt_header));
iounmap(vbt_virtual);
if (memcmp(&vbt_header.signature, "$GCT", 4))
- goto out;
+ goto report_failure;
dev_dbg(dev->dev, "GCT revision is %02x\n", vbt_header.revision);
@@ -322,9 +322,8 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv)
dev_err(dev->dev, "Unknown revision of GCT!\n");
return;
}
-
-out:
if (ret)
+ report_failure:
dev_err(dev->dev, "Unable to read GCT!");
else
dev_priv->has_gct = true;
--
2.10.0
More information about the dri-devel
mailing list