|
@@ -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;
|
|
|
}
|