staging: media: davinci_vpfe: Merge assignment with return
authorRehas Sachdeva <aquannie@gmail.com>
Tue, 20 Sep 2016 08:00:47 +0000 (13:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Sep 2016 11:59:45 +0000 (13:59 +0200)
Instead of storing the return value into a variable and then returning it, we
can club the two into a single return statement. This change was made using
the following semantic patch by Coccinelle:

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/davinci_vpfe/dm365_isif.c

index ae9202ded59fa59a38be084ede2cfc93f10e3703..569bcdc9ce2fc0ea5f3e181dd3d1905d9a92ccce 100644 (file)
@@ -146,9 +146,8 @@ enum v4l2_field vpfe_isif_get_fid(struct vpfe_device *vpfe_dev)
        u32 field_status;
 
        field_status = isif_read(isif->isif_cfg.base_addr, MODESET);
-       field_status = (field_status >> DM365_ISIF_MDFS_OFFSET) &
-                       DM365_ISIF_MDFS_MASK;
-       return field_status;
+       return (field_status >> DM365_ISIF_MDFS_OFFSET) &
+               DM365_ISIF_MDFS_MASK;
 }
 
 static int
@@ -594,8 +593,7 @@ isif_validate_raw_params(struct vpfe_isif_raw_config *params)
        ret = isif_validate_dfc_params(&params->dfc);
        if (ret)
                return ret;
-       ret = isif_validate_bclamp_params(&params->bclamp);
-       return ret;
+       return isif_validate_bclamp_params(&params->bclamp);
 }
 
 static int isif_set_params(struct v4l2_subdev *sd, void *params)