OSDN Git Service

media: v4l: async: fix unbind error in v4l2_async_notifier_unregister()
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Mon, 2 Oct 2017 20:16:52 +0000 (16:16 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Oct 2017 16:12:00 +0000 (12:12 -0400)
commit633d185b7239a4b342bab4cc15a414f7d74635ad
tree05df1ea57532935b46be9d90414e6d87c667b101
parent99b7a995a4a02522292ea6313bd626a33fb0e037
media: v4l: async: fix unbind error in v4l2_async_notifier_unregister()

The call to v4l2_async_cleanup() will set sd->asd to NULL so passing it to
notifier->unbind() has no effect and leaves the notifier confused. Call
the unbind() callback prior to cleaning up the subdevice to avoid this.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/v4l2-core/v4l2-async.c