[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>
This commit is contained in:
parent
e4c0cd0ae3
commit
efb74461f5
1 changed files with 2 additions and 2 deletions
|
@ -1817,7 +1817,7 @@ static int vpfe_probe(struct platform_device *pdev)
|
||||||
struct vpfe_device *vpfe_dev;
|
struct vpfe_device *vpfe_dev;
|
||||||
struct i2c_adapter *i2c_adap;
|
struct i2c_adapter *i2c_adap;
|
||||||
struct video_device *vfd;
|
struct video_device *vfd;
|
||||||
int ret = -ENOMEM, i, j;
|
int ret, i, j;
|
||||||
int num_subdevs = 0;
|
int num_subdevs = 0;
|
||||||
|
|
||||||
/* Get the pointer to the device object */
|
/* Get the pointer to the device object */
|
||||||
|
@ -1826,7 +1826,7 @@ static int vpfe_probe(struct platform_device *pdev)
|
||||||
if (!vpfe_dev) {
|
if (!vpfe_dev) {
|
||||||
v4l2_err(pdev->dev.driver,
|
v4l2_err(pdev->dev.driver,
|
||||||
"Failed to allocate memory for vpfe_dev\n");
|
"Failed to allocate memory for vpfe_dev\n");
|
||||||
return ret;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
vpfe_dev->pdev = &pdev->dev;
|
vpfe_dev->pdev = &pdev->dev;
|
||||||
|
|
Loading…
Add table
Reference in a new issue