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

Commit 93941573 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: Add check for pointer and array index" into msm-4.8

parents 8ef4f847 ffbda0f9
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -110,10 +110,14 @@ static inline void snd_mask_reset_range(struct snd_mask *mask,

static inline void snd_mask_leave(struct snd_mask *mask, unsigned int val)
{
	unsigned int v;
	v = mask->bits[MASK_OFS(val)] & MASK_BIT(val);
	unsigned int v, bits_index;

	bits_index = MASK_OFS(val);
	if (bits_index < ((SNDRV_MASK_MAX+31)/32)) {
		v = mask->bits[bits_index] & MASK_BIT(val);
		snd_mask_none(mask);
	mask->bits[MASK_OFS(val)] = v;
		mask->bits[bits_index] = v;
	}
}

static inline void snd_mask_intersect(struct snd_mask *mask,
+1 −1
Original line number Diff line number Diff line
@@ -628,7 +628,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
		platform->driver->ops->close(substream);

platform_err:
	if (cpu_dai->driver->ops->shutdown)
	if (cpu_dai->driver->ops && cpu_dai->driver->ops->shutdown)
		cpu_dai->driver->ops->shutdown(substream, cpu_dai);
out:
	mutex_unlock(&rtd->pcm_mutex);