All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] [media] em28xx: Fix IR unregister logic
       [not found] <d2fea3477b6527f29b946f6aa5842398d72c3a1e.1311918789.git.mchehab@redhat.com>
@ 2011-07-29  5:53 ` Mauro Carvalho Chehab
  2011-07-29 21:40   ` Jarod Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2011-07-29  5:53 UTC (permalink / raw)
  Cc: Linux Media Mailing List

The input stop() callback already calls the em28xx_ir_stop method.
Calling it again causes an oops.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c
index 5d12b14..679da48 100644
--- a/drivers/media/video/em28xx/em28xx-input.c
+++ b/drivers/media/video/em28xx/em28xx-input.c
@@ -463,11 +463,11 @@ int em28xx_ir_fini(struct em28xx *dev)
 	if (!ir)
 		return 0;
 
-	em28xx_ir_stop(ir->rc);
-	rc_unregister_device(ir->rc);
-	kfree(ir);
+	if (ir->rc)
+		rc_unregister_device(ir->rc);
 
 	/* done */
+	kfree(ir);
 	dev->ir = NULL;
 	return 0;
 }
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] [media] em28xx: Fix IR unregister logic
  2011-07-29  5:53 ` [PATCH 2/2] [media] em28xx: Fix IR unregister logic Mauro Carvalho Chehab
@ 2011-07-29 21:40   ` Jarod Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jarod Wilson @ 2011-07-29 21:40 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

On Jul 29, 2011, at 1:53 AM, Mauro Carvalho Chehab wrote:

> The input stop() callback already calls the em28xx_ir_stop method.
> Calling it again causes an oops.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Yep, my old em28xx HVR-950 behaves much better with this and patch 1
of the pair applied.

Acked-by: Jarod Wilson <jarod@redhat.com>

-- 
Jarod Wilson
jarod@wilsonet.com




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-29 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <d2fea3477b6527f29b946f6aa5842398d72c3a1e.1311918789.git.mchehab@redhat.com>
2011-07-29  5:53 ` [PATCH 2/2] [media] em28xx: Fix IR unregister logic Mauro Carvalho Chehab
2011-07-29 21:40   ` Jarod Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.