mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
media: v4l2-async: Safely clean up an uninitialised notifier
Make the V4L2 async framework a bit more robust by allowing to clean up an uninitialised notifier. Otherwise the result would be a (close to) NULL pointer dereference. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
2ea4cfc9a7
commit
d1e164289e
1 changed files with 1 additions and 1 deletions
|
|
@ -534,7 +534,7 @@ static void __v4l2_async_notifier_cleanup(struct v4l2_async_notifier *notifier)
|
|||
{
|
||||
struct v4l2_async_subdev *asd, *tmp;
|
||||
|
||||
if (!notifier)
|
||||
if (!notifier || !notifier->asd_list.next)
|
||||
return;
|
||||
|
||||
list_for_each_entry_safe(asd, tmp, ¬ifier->asd_list, asd_list) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue