提交 0fea0e9a 编写于 作者: J Jeff Garzik 提交者: Dmitry Torokhov

Input: logips2pp - handle sysfs errors

Signed-off-by: NJeff Garzik <jeff@garzik.org>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 8ff22ea7
......@@ -328,6 +328,7 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties)
unsigned char model, buttons;
const struct ps2pp_info *model_info;
int use_ps2pp = 0;
int error;
param[0] = 0;
ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
......@@ -393,8 +394,14 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties)
psmouse->set_resolution = ps2pp_set_resolution;
psmouse->disconnect = ps2pp_disconnect;
device_create_file(&psmouse->ps2dev.serio->dev,
&psmouse_attr_smartscroll.dattr);
error = device_create_file(&psmouse->ps2dev.serio->dev,
&psmouse_attr_smartscroll.dattr);
if (error) {
printk(KERN_ERR
"logips2pp.c: failed to create smartscroll "
"sysfs attribute, error: %d\n", error);
return -1;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册