[media] MEDIA: ttusbir, fix double free
authorJiri Slaby <jslaby@suse.cz>
Thu, 4 Apr 2013 19:32:09 +0000 (16:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 8 Apr 2013 09:54:01 +0000 (06:54 -0300)
rc_unregister_device already calls rc_free_device to free the passed
device. But in one of ttusbir's probe fail paths, we call
rc_unregister_device _and_ rc_free_device. This is wrong and results
in a double free.
Instead, set rc to NULL resulting in rc_free_device being a noop.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/ttusbir.c

Simple merge