Skip to content

Commit

Permalink
Remove always true condition in msgs
Browse files Browse the repository at this point in the history
Clang was catching that since the char buffer was part of the struct
this will always result in true.

Change-Id: Ice25db4baa16ac2cf2118ba1efaa4af89081bc80
Signed-off-by: Curtis Malainey <cujomalainey@google.com>
  • Loading branch information
cujomalainey authored and plbossart committed Aug 15, 2018
1 parent 6d312cc commit 5420b87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,8 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,

dev_dbg(sdev->dev, "tplg: ready widget id %d pipe %d type %d name : %s stream %s\n",
swidget->comp_id, index, swidget->id, tw->name,
tw->sname ? tw->sname : "none");
strnlen(tw->sname, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) > 0
? tw->sname : "none");

/* handle any special case widgets */
switch (w->id) {
Expand Down Expand Up @@ -1419,7 +1420,8 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,
dev_err(sdev->dev,
"error: DSP failed to add widget id %d type %d name : %s stream %s reply %d\n",
tw->shift, swidget->id, tw->name,
tw->sname ? tw->sname : "none", reply.rhdr.error);
strnlen(tw->sname, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) > 0
? tw->sname : "none", reply.rhdr.error);
kfree(swidget);
return ret;
}
Expand Down

0 comments on commit 5420b87

Please sign in to comment.