Commit ab8d7194 authored by Sakari Ailus's avatar Sakari Ailus Committed by Hans Verkuil
Browse files

media: v4l: Safely to call v4l2_subdev_cleanup on an uninitialised subdev



Graciously handle an uninitialised (but still zeroed) sub-device in
v4l2_subdev_cleanup(). The list_empty() check there is unnecessary, too,
so replace that by cheking whether the lists's next field is NULL.

Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent fb16c04a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment