diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-05-09 07:55:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-23 18:48:28 -0400 |
commit | 5b340ea0caac4c123a3bb989a43c021a2dc06fb2 (patch) | |
tree | 5219f981f336e577d471f1e5eb862dd9c0295c45 | |
parent | 68592773e35cafdf2a17ceaaf8553513ed4c86aa (diff) |
[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>
-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 14bdc19ec48f..40580228a6c7 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) | |||
906 | if (!pd) | 906 | if (!pd) |
907 | return -ENOMEM; | 907 | return -ENOMEM; |
908 | pd->vdev = video_device_alloc(); | 908 | pd->vdev = video_device_alloc(); |
909 | if (!pd->vdev) | 909 | if (!pd->vdev) { |
910 | err = -ENOMEM; | ||
910 | goto err_video_device_alloc; | 911 | goto err_video_device_alloc; |
912 | } | ||
911 | *pd->vdev = dt3155_vdev; | 913 | *pd->vdev = dt3155_vdev; |
912 | pci_set_drvdata(pdev, pd); /* for use in dt3155_remove() */ | 914 | pci_set_drvdata(pdev, pd); /* for use in dt3155_remove() */ |
913 | video_set_drvdata(pd->vdev, pd); /* for use in video_fops */ | 915 | video_set_drvdata(pd->vdev, pd); /* for use in video_fops */ |