Commit dbdc7237 authored by Umang Jain's avatar Umang Jain Committed by Mauro Carvalho Chehab

media: staging/intel-ipu3: Cleanup dummy buffers via helper

Use an existing helper imgu_video_nodes_exit() on imgu-video-node
initialization failure path to cleanup dummy buffers.
Signed-off-by: default avatarUmang Jain <umang.jain@ideasonboard.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 1ad03764
......@@ -440,6 +440,16 @@ int imgu_s_stream(struct imgu_device *imgu, int enable)
return r;
}
static void imgu_video_nodes_exit(struct imgu_device *imgu)
{
int i;
for (i = 0; i < IMGU_MAX_PIPE_NUM; i++)
imgu_dummybufs_cleanup(imgu, i);
imgu_v4l2_unregister(imgu);
}
static int imgu_video_nodes_init(struct imgu_device *imgu)
{
struct v4l2_pix_format_mplane *fmts[IPU3_CSS_QUEUES] = { NULL };
......@@ -489,24 +499,11 @@ static int imgu_video_nodes_init(struct imgu_device *imgu)
return 0;
out_cleanup:
for (j = 0; j < IMGU_MAX_PIPE_NUM; j++)
imgu_dummybufs_cleanup(imgu, j);
imgu_v4l2_unregister(imgu);
imgu_video_nodes_exit(imgu);
return r;
}
static void imgu_video_nodes_exit(struct imgu_device *imgu)
{
int i;
for (i = 0; i < IMGU_MAX_PIPE_NUM; i++)
imgu_dummybufs_cleanup(imgu, i);
imgu_v4l2_unregister(imgu);
}
/**************** PCI interface ****************/
static irqreturn_t imgu_isr_threaded(int irq, void *imgu_ptr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment