lkml.org 
[lkml]   [2017]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ASoC: Add a sanity check before using dai driver name
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))

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-08-22 18:18    [W:0.051 / U:3.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site