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

Commit b23e8e51 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman
Browse files

staging: most: v4l2-aim: remove unnecessary retval



The function aim_register_videodev() uses the variables 'ret' and
'retval' to represent the same value.

This patch removes 'retval' and replaces it with 'ret'. Further, it
replaces the constant return value '-ENODEV' with the result returned by
function video_register_device() in the event something went wrong.

Signed-off-by: default avatarAndrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8f6f9ed1
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -439,7 +439,6 @@ static int aim_rx_data(struct mbo *mbo)


static int aim_register_videodev(struct most_video_dev *mdev)
static int aim_register_videodev(struct most_video_dev *mdev)
{
{
	int retval = -ENOMEM;
	int ret;
	int ret;


	v4l2_info(&mdev->v4l2_dev, "aim_register_videodev()\n");
	v4l2_info(&mdev->v4l2_dev, "aim_register_videodev()\n");
@@ -460,11 +459,10 @@ static int aim_register_videodev(struct most_video_dev *mdev)


	/* Register the v4l2 device */
	/* Register the v4l2 device */
	video_set_drvdata(mdev->vdev, mdev);
	video_set_drvdata(mdev->vdev, mdev);
	retval = video_register_device(mdev->vdev, VFL_TYPE_GRABBER, -1);
	ret = video_register_device(mdev->vdev, VFL_TYPE_GRABBER, -1);
	if (retval != 0) {
	if (ret) {
		v4l2_err(&mdev->v4l2_dev, "video_register_device failed (%d)\n",
		v4l2_err(&mdev->v4l2_dev, "video_register_device failed (%d)\n",
			 retval);
			 ret);
		ret = -ENODEV;
		goto err_vbi_dev;
		goto err_vbi_dev;
	}
	}