diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-10-12 11:30:28 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-16 17:43:33 +0300 |
commit | efb74461f5a66c0004d0c13ef59c86bcf5961477 (patch) | |
tree | ab569be93e7624b3e943a1b56cbe4cd9fe83aa23 /drivers/media/platform/davinci | |
parent | e4c0cd0ae34b5e8ea3e8f4eced531dccabe3124c (diff) | |
download | linux-efb74461f5a66c0004d0c13ef59c86bcf5961477.tar.xz |
[media] DaVinci-VPFE-Capture: Delete an unnecessary variable initialisation in vpfe_probe()
* Return an error code as a constant after a failed call of
the function "vpfe_initialize".
* The local variable "ret" will be set then to an appropriate value
a bit later. Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/davinci')
-rw-r--r-- | drivers/media/platform/davinci/vpfe_capture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 9109a286a869..cee14aa95061 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -1817,7 +1817,7 @@ static int vpfe_probe(struct platform_device *pdev) struct vpfe_device *vpfe_dev; struct i2c_adapter *i2c_adap; struct video_device *vfd; - int ret = -ENOMEM, i, j; + int ret, i, j; int num_subdevs = 0; /* Get the pointer to the device object */ @@ -1826,7 +1826,7 @@ static int vpfe_probe(struct platform_device *pdev) if (!vpfe_dev) { v4l2_err(pdev->dev.driver, "Failed to allocate memory for vpfe_dev\n"); - return ret; + return -ENOMEM; } vpfe_dev->pdev = &pdev->dev; |