Commit d1939e4c authored by David Ellingsworth's avatar David Ellingsworth Committed by Mauro Carvalho Chehab

V4L/DVB (13063): radio-mr800: remove unnecessary local variable

Remove unnecessary local variable.
Signed-off-by: default avatarDavid Ellingsworth <david@identd.dyndns.org>
Acked-by: default avatarAlexey Klimov <klimov.linux@gmail.com>
Signed-off-by: default avatarDouglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1b8bbb3c
...@@ -688,7 +688,6 @@ static int usb_amradio_probe(struct usb_interface *intf, ...@@ -688,7 +688,6 @@ static int usb_amradio_probe(struct usb_interface *intf,
const struct usb_device_id *id) const struct usb_device_id *id)
{ {
struct amradio_device *radio; struct amradio_device *radio;
struct v4l2_device *v4l2_dev;
int retval = 0; int retval = 0;
radio = kzalloc(sizeof(struct amradio_device), GFP_KERNEL); radio = kzalloc(sizeof(struct amradio_device), GFP_KERNEL);
...@@ -707,16 +706,15 @@ static int usb_amradio_probe(struct usb_interface *intf, ...@@ -707,16 +706,15 @@ static int usb_amradio_probe(struct usb_interface *intf,
goto err_nobuf; goto err_nobuf;
} }
v4l2_dev = &radio->v4l2_dev; retval = v4l2_device_register(&intf->dev, &radio->v4l2_dev);
retval = v4l2_device_register(&intf->dev, v4l2_dev);
if (retval < 0) { if (retval < 0) {
dev_err(&intf->dev, "couldn't register v4l2_device\n"); dev_err(&intf->dev, "couldn't register v4l2_device\n");
goto err_v4l2; goto err_v4l2;
} }
strlcpy(radio->videodev.name, v4l2_dev->name, strlcpy(radio->videodev.name, radio->v4l2_dev.name,
sizeof(radio->videodev.name)); sizeof(radio->videodev.name));
radio->videodev.v4l2_dev = v4l2_dev; radio->videodev.v4l2_dev = &radio->v4l2_dev;
radio->videodev.fops = &usb_amradio_fops; radio->videodev.fops = &usb_amradio_fops;
radio->videodev.ioctl_ops = &usb_amradio_ioctl_ops; radio->videodev.ioctl_ops = &usb_amradio_ioctl_ops;
radio->videodev.release = usb_amradio_video_device_release; radio->videodev.release = usb_amradio_video_device_release;
...@@ -742,7 +740,7 @@ static int usb_amradio_probe(struct usb_interface *intf, ...@@ -742,7 +740,7 @@ static int usb_amradio_probe(struct usb_interface *intf,
return 0; return 0;
err_vdev: err_vdev:
v4l2_device_unregister(v4l2_dev); v4l2_device_unregister(&radio->v4l2_dev);
err_v4l2: err_v4l2:
kfree(radio->buffer); kfree(radio->buffer);
err_nobuf: err_nobuf:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment