diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-27 07:53:24 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-27 07:53:24 -0500 |
commit | 014c41fce1bd5cec381e70fc6f58fdfc96cdaf69 (patch) | |
tree | 148d95c1f27acaee25991e6b1cb9e606d91f899d /sound/pci/hda/hda_hwdep.c | |
parent | b82855a0d76ebda1cc14c00040560d77bfa042ce (diff) |
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 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, \ | |||
293 | { \ | 293 | { \ |
294 | struct snd_hwdep *hwdep = dev_get_drvdata(dev); \ | 294 | struct snd_hwdep *hwdep = dev_get_drvdata(dev); \ |
295 | struct hda_codec *codec = hwdep->private_data; \ | 295 | struct hda_codec *codec = hwdep->private_data; \ |
296 | char *after; \ | 296 | unsigned long val; \ |
297 | codec->type = simple_strtoul(buf, &after, 0); \ | 297 | int err = strict_strtoul(buf, 0, &val); \ |
298 | if (err < 0) \ | ||
299 | return err; \ | ||
300 | codec->type = val; \ | ||
298 | return count; \ | 301 | return count; \ |
299 | } | 302 | } |
300 | 303 | ||