Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133060
b: refs/heads/master
c: d2f57cd
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Feb 20, 2009
1 parent 8934939 commit 91ec827
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e0e44d430281d398769f1d7864e161203252760
refs/heads/master: d2f57cd54a602c979e571aa337b206c88609876d
15 changes: 8 additions & 7 deletions trunk/sound/pci/hda/hda_hwdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,18 +277,19 @@ static ssize_t init_verbs_store(struct device *dev,
{
struct snd_hwdep *hwdep = dev_get_drvdata(dev);
struct hda_codec *codec = hwdep->private_data;
char *p;
struct hda_verb verb, *v;
struct hda_verb *v;
int nid, verb, param;

verb.nid = simple_strtoul(buf, &p, 0);
verb.verb = simple_strtoul(p, &p, 0);
verb.param = simple_strtoul(p, &p, 0);
if (!verb.nid || !verb.verb || !verb.param)
if (sscanf(buf, "%i %i %i", &nid, &verb, &param) != 3)
return -EINVAL;
if (!nid || !verb)
return -EINVAL;
v = snd_array_new(&codec->init_verbs);
if (!v)
return -ENOMEM;
*v = verb;
v->nid = nid;
v->verb = verb;
v->param = param;
return count;
}

Expand Down

0 comments on commit 91ec827

Please sign in to comment.