[media] s5p-fimc: Fix wrong pointer dereference when unregistering sensors
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Tue, 13 Sep 2011 17:07:09 +0000 (14:07 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 24 Nov 2011 22:57:12 +0000 (20:57 -0200)
After i2c_unregister_device() has been called the client object can already
be freed and thus using the client pointer may lead to dereferencing freed
memory. Avoid this by saving the adapter pointer for further use before
i2c_unregister_device() call.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

No differences found