Commit 3d42c93e authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: dmxdev: change the check for problems allocing secfeed

While the logic there is right, it tricks static check analyzers,
like smatch:

	drivers/media/dvb-core/dmxdev.c:729 dvb_dmxdev_filter_start() error: we previously assumed '*secfeed' could be null (see line 719)

Because the implementation of the filter itself is made via
a callback, with its real implementation at the
dvbdmx_allocate_section_feed() inside dvb_demux.c.

So, change the check logic to make it clear that the function
will not try to use *secfeed == NULL.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 45040f67
...@@ -720,7 +720,7 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter) ...@@ -720,7 +720,7 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
ret = dmxdev->demux->allocate_section_feed(dmxdev->demux, ret = dmxdev->demux->allocate_section_feed(dmxdev->demux,
secfeed, secfeed,
dvb_dmxdev_section_callback); dvb_dmxdev_section_callback);
if (ret < 0) { if (!*secfeed) {
pr_err("DVB (%s): could not alloc feed\n", pr_err("DVB (%s): could not alloc feed\n",
__func__); __func__);
return ret; return ret;
......
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