Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11a087f4 authored by Oliver Neukum's avatar Oliver Neukum Committed by Mauro Carvalho Chehab
Browse files

media: uvcvideo: Fix access to uninitialized fields on probe error



We need to check whether this work we are canceling actually is
initialized.

Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
Reported-by: default avatar <syzbot+2e1ef9188251d9cc7944@syzkaller.appspotmail.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 675e2f20
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2345,6 +2345,8 @@ void uvc_ctrl_cleanup_device(struct uvc_device *dev)
	struct uvc_entity *entity;
	unsigned int i;

	/* Can be uninitialized if we are aborting on probe error. */
	if (dev->async_ctrl.work.func)
		cancel_work_sync(&dev->async_ctrl.work);

	/* Free controls and control mappings for all entities. */