mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
media: v4l: async: Don't set notifier's V4L2 device if registering fails
commit46bc0234ad
upstream. The V4L2 device used to be set when the notifier was registered but this has been moved to the notifier initialisation. Don't touch the V4L2 device if registration fails. Fixes:b8ec754ae4
("media: v4l: async: Set v4l2_device and subdev in async notifier init") Cc: <stable@vger.kernel.org> # for 6.6 and later Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
87100b0924
commit
001b4825c9
@ -618,16 +618,10 @@ err_unlock:
|
||||
|
||||
int v4l2_async_nf_register(struct v4l2_async_notifier *notifier)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (WARN_ON(!notifier->v4l2_dev == !notifier->sd))
|
||||
return -EINVAL;
|
||||
|
||||
ret = __v4l2_async_nf_register(notifier);
|
||||
if (ret)
|
||||
notifier->v4l2_dev = NULL;
|
||||
|
||||
return ret;
|
||||
return __v4l2_async_nf_register(notifier);
|
||||
}
|
||||
EXPORT_SYMBOL(v4l2_async_nf_register);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user