diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-21 07:36:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-21 07:36:55 -0800 |
commit | 4caca5f917ce991dc67fbb42fa82a1f044538e23 (patch) | |
tree | 29c9dadc3ab4aed954d8900f7171b44cd7a873bd /drivers/staging/asus_oled/asus_oled.c | |
parent | f8c7e6c2038a96f427911264a0c1448c9e3c2a9e (diff) | |
parent | 7692fd4d441afac728cb83fdd33349d5ba07406c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
Staging: hv: fix smp problems in the hyperv core code
Staging: et131x: Fix 2.6.33rc1 regression in et131x
Staging: asus_oled: fix oops in 2.6.32.2
Diffstat (limited to 'drivers/staging/asus_oled/asus_oled.c')
-rw-r--r-- | drivers/staging/asus_oled/asus_oled.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c index f4c26572c7d..43c57b7688a 100644 --- a/drivers/staging/asus_oled/asus_oled.c +++ b/drivers/staging/asus_oled/asus_oled.c @@ -194,9 +194,11 @@ static ssize_t set_enabled(struct device *dev, struct device_attribute *attr, { struct usb_interface *intf = to_usb_interface(dev); struct asus_oled_dev *odev = usb_get_intfdata(intf); - int temp = strict_strtoul(buf, 10, NULL); + unsigned long value; + if (strict_strtoul(buf, 10, &value)) + return -EINVAL; - enable_oled(odev, temp); + enable_oled(odev, value); return count; } @@ -207,10 +209,12 @@ static ssize_t class_set_enabled(struct device *device, { struct asus_oled_dev *odev = (struct asus_oled_dev *) dev_get_drvdata(device); + unsigned long value; - int temp = strict_strtoul(buf, 10, NULL); + if (strict_strtoul(buf, 10, &value)) + return -EINVAL; - enable_oled(odev, temp); + enable_oled(odev, value); return count; } |