diff mbox

[1/3] drm/gma500: Code cleanup - removal of centralized exiting of function

Message ID 1394917938-1746-1-git-send-email-arthurborsboom@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arthur Borsboom March 15, 2014, 9:12 p.m. UTC
Removed centralized exiting of function (goto statement), since it was
the only used in one single location with only a return statement.

Signed-off-by: Arthur Borsboom <arthurborsboom@gmail.com>
---
 drivers/gpu/drm/gma500/psb_drv.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Patrik Jakobsson March 18, 2014, 12:01 a.m. UTC | #1
On Sat, Mar 15, 2014 at 10:12 PM, Arthur Borsboom
<arthurborsboom@gmail.com>wrote:

> Removed centralized exiting of function (goto statement), since it was
> the only used in one single location with only a return statement.
>
> Signed-off-by: Arthur Borsboom <arthurborsboom@gmail.com>
> ---
>  drivers/gpu/drm/gma500/psb_drv.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/psb_drv.c
> b/drivers/gpu/drm/gma500/psb_drv.c
> index 1199180..a10db3d 100644
> --- a/drivers/gpu/drm/gma500/psb_drv.c
> +++ b/drivers/gpu/drm/gma500/psb_drv.c
> @@ -169,12 +169,9 @@ static int psb_do_init(struct drm_device *dev)
>
>         uint32_t stolen_gtt;
>
> -       int ret = -ENOMEM;
> -
>         if (pg->mmu_gatt_start & 0x0FFFFFFF) {
>                 dev_err(dev->dev, "Gatt must be 256M aligned. This is a
> bug.\n");
> -               ret = -EINVAL;
> -               goto out_err;
> +               return -EINVAL;
>         }
>
>
> @@ -199,8 +196,6 @@ static int psb_do_init(struct drm_device *dev)
>         /* mmu_gatt ?? */
>         PSB_WSGX32(pg->gatt_start, PSB_CR_BIF_TWOD_REQ_BASE);
>         return 0;
> -out_err:
> -       return ret;
>  }
>
>  static int psb_driver_unload(struct drm_device *dev)
> --
> 1.9.0
>
>
These three patches are now merged and ready for 3.15-rc1

Thanks
Patrik
diff mbox

Patch

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 1199180..a10db3d 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -169,12 +169,9 @@  static int psb_do_init(struct drm_device *dev)
 
 	uint32_t stolen_gtt;
 
-	int ret = -ENOMEM;
-
 	if (pg->mmu_gatt_start & 0x0FFFFFFF) {
 		dev_err(dev->dev, "Gatt must be 256M aligned. This is a bug.\n");
-		ret = -EINVAL;
-		goto out_err;
+		return -EINVAL;
 	}
 
 
@@ -199,8 +196,6 @@  static int psb_do_init(struct drm_device *dev)
 	/* mmu_gatt ?? */
 	PSB_WSGX32(pg->gatt_start, PSB_CR_BIF_TWOD_REQ_BASE);
 	return 0;
-out_err:
-	return ret;
 }
 
 static int psb_driver_unload(struct drm_device *dev)