diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-03-16 07:50:49 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-03-16 07:50:49 +0100 |
commit | a9104f989916aac5d92bfa2c51915d5985fb2e6c (patch) | |
tree | 17bef4eac561e3ac90d98d68190978e686712b67 /sound/pci/hda/hda_hwdep.c | |
parent | ad6cfc2ac71180171e090e69ae8762ac511884b1 (diff) | |
parent | 89c0ac7cab2440a771ba1e2ab953186bc9c29786 (diff) |
Merge branch 'topic/misc' into fix/misc
Diffstat (limited to 'sound/pci/hda/hda_hwdep.c')
-rw-r--r-- | sound/pci/hda/hda_hwdep.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 40ccb419b6e9..b36919c0d363 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c @@ -293,8 +293,11 @@ static ssize_t type##_store(struct device *dev, \ { \ struct snd_hwdep *hwdep = dev_get_drvdata(dev); \ struct hda_codec *codec = hwdep->private_data; \ - char *after; \ - codec->type = simple_strtoul(buf, &after, 0); \ + unsigned long val; \ + int err = strict_strtoul(buf, 0, &val); \ + if (err < 0) \ + return err; \ + codec->type = val; \ return count; \ } |