Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194878
b: refs/heads/master
c: 7b767ca
h: refs/heads/master
v: v3
  • Loading branch information
Tomas Winkler authored and Marcel Holtmann committed May 10, 2010
1 parent a40fc27 commit ed954f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 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: f120c6b635a62d414876b517aec0468628acfc60
refs/heads/master: 7b767cad296d17cfe071734f71a3b7b479534c8c
18 changes: 6 additions & 12 deletions trunk/net/bluetooth/hci_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,9 @@ static ssize_t show_idle_timeout(struct device *dev, struct device_attribute *at
static ssize_t store_idle_timeout(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
struct hci_dev *hdev = dev_get_drvdata(dev);
char *ptr;
__u32 val;
unsigned long val;

val = simple_strtoul(buf, &ptr, 10);
if (ptr == buf)
if (strict_strtoul(buf, 0, &val) < 0)
return -EINVAL;

if (val != 0 && (val < 500 || val > 3600000))
Expand All @@ -305,11 +303,9 @@ static ssize_t show_sniff_max_interval(struct device *dev, struct device_attribu
static ssize_t store_sniff_max_interval(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
struct hci_dev *hdev = dev_get_drvdata(dev);
char *ptr;
__u16 val;
unsigned long val;

val = simple_strtoul(buf, &ptr, 10);
if (ptr == buf)
if (strict_strtoul(buf, 0, &val) < 0)
return -EINVAL;

if (val < 0x0002 || val > 0xFFFE || val % 2)
Expand All @@ -332,11 +328,9 @@ static ssize_t show_sniff_min_interval(struct device *dev, struct device_attribu
static ssize_t store_sniff_min_interval(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
struct hci_dev *hdev = dev_get_drvdata(dev);
char *ptr;
__u16 val;
unsigned long val;

val = simple_strtoul(buf, &ptr, 10);
if (ptr == buf)
if (strict_strtoul(buf, 0, &val) < 0)
return -EINVAL;

if (val < 0x0002 || val > 0xFFFE || val % 2)
Expand Down

0 comments on commit ed954f3

Please sign in to comment.