Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cc0f28c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "media: dvb-core: Fix coding errors in broadcast drivers"

parents 3c50776b 9603f4f5
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1615,7 +1615,7 @@ static int dvb_dvr_get_event(struct dmxdev *dmxdev,
				unsigned int f_flags,
				struct dmx_filter_event *event)
{
	int res;
	int res = 0;

	if (!((f_flags & O_ACCMODE) == O_RDONLY))
		return -EINVAL;
@@ -2402,8 +2402,10 @@ static int dvb_dmxdev_set_playback_mode(struct dmxdev_filter *dmxdevfilter,
		(playback_mode != DMX_PB_MODE_PULL))
		return -EINVAL;

	if (dmxdev->demux->set_playback_mode == NULL)
		return -EINVAL;

	if (((dmxdev->source < DMX_SOURCE_DVR0) ||
		 !dmxdev->demux->set_playback_mode ||
		 !(caps.caps & DMX_CAP_PULL_MODE)) &&
		 (playback_mode == DMX_PB_MODE_PULL))
		return -EPERM;
@@ -2520,7 +2522,7 @@ static int dvb_dmxdev_release_data(struct dmxdev_filter *dmxdevfilter,
static int dvb_dmxdev_get_event(struct dmxdev_filter *dmxdevfilter,
					struct dmx_filter_event *event)
{
	int res;
	int res = 0;

	spin_lock_irq(&dmxdevfilter->dev->lock);

+7 −1
Original line number Diff line number Diff line
@@ -2210,7 +2210,13 @@ int tspp_remove_filter(u32 dev, u32 channel_id,
	channel = &pdev->channels[channel_id];

	src = channel->src;
	if ((src == TSPP_SOURCE_TSIF0) || (src == TSPP_SOURCE_TSIF1))
		tspp_filter = &(pdev->filters[src]->filter[filter->priority]);
	else {
		pr_err("tspp_remove: wrong source type %d", src);
		return -EINVAL;
	}


	/* disable pipe (channel) */
	val = readl_relaxed(pdev->base + TSPP_PS_DISABLE);
+6 −5
Original line number Diff line number Diff line
@@ -6536,10 +6536,8 @@ static int mpq_sdmx_write(struct mpq_demux *mpq_demux,
	const char *buf,
	size_t count)
{
	struct ion_handle *ion_handle =
		mpq_demux->demux.dmx.dvr_input.priv_handle;
	struct dvb_ringbuffer *rbuf = (struct dvb_ringbuffer *)
		mpq_demux->demux.dmx.dvr_input.ringbuff;
	struct ion_handle *ion_handle;
	struct dvb_ringbuffer *rbuf;
	struct sdmx_buff_descr buf_desc;
	u32 read_offset;
	int ret;
@@ -6549,6 +6547,9 @@ static int mpq_sdmx_write(struct mpq_demux *mpq_demux,
		return -EINVAL;
	}

	ion_handle = mpq_demux->demux.dmx.dvr_input.priv_handle;
	rbuf = (struct dvb_ringbuffer *)mpq_demux->demux.dmx.dvr_input.ringbuff;

	ret = mpq_sdmx_dvr_buffer_desc(mpq_demux, &buf_desc);
	if (ret) {
		MPQ_DVB_ERR_PRINT(