Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b340ea0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab
Browse files

[media] Staging: dt3155v4l: set error code on failure



We should be returning -ENOMEM here instead of success.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 68592773
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 */