mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Volokh Konstantin <volokh84@gmail.com>
To: linux-media@vger.kernel.org
Cc: mchehab@redhat.com, gregkh@linuxfoundation.org,
	volokh84@gmail.com, dhowells@redhat.com, rdunlap@xenotime.net,
	hans.verkuil@cisco.com, justinmattock@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] staging: media: go7007: firmware protection Protection for unfirmware load
Date: Wed, 16 Jan 2013 17:00:49 +0400	[thread overview]
Message-ID: <1358341251-10087-2-git-send-email-volokh84@gmail.com> (raw)
In-Reply-To: <1358341251-10087-1-git-send-email-volokh84@gmail.com>

Signed-off-by: Volokh Konstantin <volokh84@gmail.com>
---
 drivers/staging/media/go7007/go7007-usb.c  |    2 +-
 drivers/staging/media/go7007/go7007-v4l2.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c
index 5443e25..a6cad15 100644
--- a/drivers/staging/media/go7007/go7007-usb.c
+++ b/drivers/staging/media/go7007/go7007-usb.c
@@ -1245,7 +1245,6 @@ static void go7007_usb_disconnect(struct usb_interface *intf)
 	struct urb *vurb, *aurb;
 	int i;
 
-	go->status = STATUS_SHUTDOWN;
 	usb_kill_urb(usb->intr_urb);
 
 	/* Free USB-related structs */
@@ -1269,6 +1268,7 @@ static void go7007_usb_disconnect(struct usb_interface *intf)
 	kfree(go->hpi_context);
 
 	go7007_remove(go);
+	go->status = STATUS_SHUTDOWN;
 }
 
 static struct usb_driver go7007_usb_driver = {
diff --git a/drivers/staging/media/go7007/go7007-v4l2.c b/drivers/staging/media/go7007/go7007-v4l2.c
index e6fa543..a69250f 100644
--- a/drivers/staging/media/go7007/go7007-v4l2.c
+++ b/drivers/staging/media/go7007/go7007-v4l2.c
@@ -1832,5 +1832,6 @@ void go7007_v4l2_remove(struct go7007 *go)
 	mutex_unlock(&go->hw_lock);
 	if (go->video_dev)
 		video_unregister_device(go->video_dev);
-	v4l2_device_unregister(&go->v4l2_dev);
+	if (go->status != STATUS_SHUTDOWN)
+		v4l2_device_unregister(&go->v4l2_dev);
 }
-- 
1.7.7.6


  reply	other threads:[~2013-01-16 13:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 13:00 [PATCH 1/4] staging: media: go7007: memory clear fix memory clearing for v4l2_subdev allocation Volokh Konstantin
2013-01-16 13:00 ` Volokh Konstantin [this message]
2013-01-16 13:35   ` [PATCH 2/4] staging: media: go7007: firmware protection Protection for unfirmware load Dan Carpenter
2013-01-16 13:42     ` Volokh Konstantin
2013-01-16 18:03       ` Ezequiel Garcia
2013-01-16 13:00 ` [PATCH 3/4] staging: media: go7007: i2c GPIO initialization Reset i2c stuff for GO7007_BOARDID_ADLINK_MPG24 need reset GPIO always when encoder initialize Volokh Konstantin
2013-01-16 13:36   ` Dan Carpenter
2013-01-16 14:00     ` Volokh Konstantin
2013-01-16 14:33       ` Dan Carpenter
2013-01-16 13:00 ` [PATCH 4/4] staging: media: go7007: call_all stream stuff Some Additional stuff for v4l2_subdev stream events partial need for new style framework. Also need for wis_tw2804 notification stuff Volokh Konstantin
2013-01-16 13:20 ` [PATCH 1/4] staging: media: go7007: memory clear fix memory clearing for v4l2_subdev allocation Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358341251-10087-2-git-send-email-volokh84@gmail.com \
    --to=volokh84@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dhowells@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hans.verkuil@cisco.com \
    --cc=justinmattock@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®