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

Patrik Jakobsson patrik.r.jakobsson at gmail.com
Fri Mar 14 16:23:24 PDT 2014


On Thu, Mar 13, 2014 at 10:49 PM, Arthur Borsboom
<arthurborsboom at 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.

As in previous patch, keep the commit message at around 72 cols.

> Signed-off-by: Arthur Borsboom <arthurborsboom at 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 ae95e31..8d6ad6c 100644
> --- a/drivers/gpu/drm/gma500/psb_drv.c
> +++ b/drivers/gpu/drm/gma500/psb_drv.c
> @@ -182,12 +182,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;
>         }
>
>         stolen_gtt = (pg->stolen_size >> PAGE_SHIFT) * 4;
> @@ -210,8 +207,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
>


More information about the dri-devel mailing list