mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
drivers/video: Remove validate_frame_setting NULL check from video_[s|try]_fmt
since the check is already done in validate_frame_setting Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -1609,12 +1609,6 @@ static int video_try_fmt(FAR struct video_mng_s *priv,
|
|||||||
|
|
||||||
ASSERT(priv && g_video_sensor_ops && g_video_data_ops);
|
ASSERT(priv && g_video_sensor_ops && g_video_data_ops);
|
||||||
|
|
||||||
if ((g_video_sensor_ops->validate_frame_setting == NULL) ||
|
|
||||||
(g_video_data_ops->validate_frame_setting == NULL))
|
|
||||||
{
|
|
||||||
return -ENOTTY;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (v4l2 == NULL)
|
if (v4l2 == NULL)
|
||||||
{
|
{
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -1753,13 +1747,6 @@ static int video_s_parm(FAR struct video_mng_s *priv,
|
|||||||
|
|
||||||
ASSERT(g_video_sensor_ops && g_video_data_ops);
|
ASSERT(g_video_sensor_ops && g_video_data_ops);
|
||||||
|
|
||||||
if ((g_video_sensor_ops->validate_frame_setting == NULL) ||
|
|
||||||
(g_video_data_ops->validate_frame_setting == NULL) ||
|
|
||||||
(parm == NULL))
|
|
||||||
{
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
type_inf = get_video_type_inf(priv, parm->type);
|
type_inf = get_video_type_inf(priv, parm->type);
|
||||||
if (type_inf == NULL)
|
if (type_inf == NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user