Re: [PATCH] ASoC: Add a sanity check before using dai driver name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 22, 2017 at 10:45:12PM +0800, Jeffy Chen wrote:

> -			return dai;
> +			if (!dlc->dai_name)
> +				return dai;
> +			if (!strcmp(dai->name, dlc->dai_name))
> +				return dai;

You want (dlc->dai_name && !strcmp(dai->name, dlc->dai_name)) for this
to be equivalent don't you?

> +			if (dai->driver->name &&
> +			    !strcmp(dai->driver->name, dlc->dai_name))

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux