diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-05-09 11:55:09 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-23 22:48:28 (GMT) |
commit | 5b340ea0caac4c123a3bb989a43c021a2dc06fb2 (patch) | |
tree | 5219f981f336e577d471f1e5eb862dd9c0295c45 /drivers/staging | |
parent | 68592773e35cafdf2a17ceaaf8553513ed4c86aa (diff) | |
download | linux-5b340ea0caac4c123a3bb989a43c021a2dc06fb2.tar.xz |
[media] Staging: dt3155v4l: set error code on failure
We should be returning -ENOMEM here instead of success.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/dt3155v4l/dt3155v4l.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c index 14bdc19..4058022 100644 --- a/drivers/staging/media/dt3155v4l/dt3155v4l.c +++ b/drivers/staging/media/dt3155v4l/dt3155v4l.c @@ -906,8 +906,10 @@ dt3155_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (!pd) return -ENOMEM; pd->vdev = video_device_alloc(); - if (!pd->vdev) + if (!pd->vdev) { + err = -ENOMEM; goto err_video_device_alloc; + } *pd->vdev = dt3155_vdev; pci_set_drvdata(pdev, pd); /* for use in dt3155_remove() */ video_set_drvdata(pd->vdev, pd); /* for use in video_fops */ |