diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-27 13:53:24 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-27 13:53:24 +0100 |
commit | 014c41fce1bd5cec381e70fc6f58fdfc96cdaf69 (patch) | |
tree | 148d95c1f27acaee25991e6b1cb9e606d91f899d /sound/pci/hda/hda_hwdep.c | |
parent | b82855a0d76ebda1cc14c00040560d77bfa042ce (diff) | |
download | kernel_samsung_tuna-014c41fce1bd5cec381e70fc6f58fdfc96cdaf69.zip kernel_samsung_tuna-014c41fce1bd5cec381e70fc6f58fdfc96cdaf69.tar.gz kernel_samsung_tuna-014c41fce1bd5cec381e70fc6f58fdfc96cdaf69.tar.bz2 |
ALSA: hda - Use strict_strtoul()
Rewrite the codes to use strict_strtoul() instead of simple_strtoul().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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 40ccb41..b36919c 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; \ } |