diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2016-06-06 13:23:09 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-15 17:17:04 (GMT) |
commit | b23e8e51e6dc40cfbdb0ae3f60fc0da3a3fda5a8 (patch) | |
tree | a2a541f20f9ee292aa83853554dcf97296dce1eb /drivers/staging/most/aim-v4l2/video.c | |
parent | 8f6f9ed15d679ad9384efd74d39aed4438cd0252 (diff) | |
download | linux-b23e8e51e6dc40cfbdb0ae3f60fc0da3a3fda5a8.tar.xz |
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: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/aim-v4l2/video.c')
-rw-r--r-- | drivers/staging/most/aim-v4l2/video.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c index b55ab62..e0fee88 100644 --- a/drivers/staging/most/aim-v4l2/video.c +++ b/drivers/staging/most/aim-v4l2/video.c @@ -439,7 +439,6 @@ static int aim_rx_data(struct mbo *mbo) static int aim_register_videodev(struct most_video_dev *mdev) { - int retval = -ENOMEM; int ret; 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 */ video_set_drvdata(mdev->vdev, mdev); - retval = video_register_device(mdev->vdev, VFL_TYPE_GRABBER, -1); - if (retval != 0) { + ret = video_register_device(mdev->vdev, VFL_TYPE_GRABBER, -1); + if (ret) { v4l2_err(&mdev->v4l2_dev, "video_register_device failed (%d)\n", - retval); - ret = -ENODEV; + ret); goto err_vbi_dev; } |