aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/mouse/cypress_ps2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse/cypress_ps2.c')
-rw-r--r--drivers/input/mouse/cypress_ps2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c
index ef651ccf130..1d81a746750 100644
--- a/drivers/input/mouse/cypress_ps2.c
+++ b/drivers/input/mouse/cypress_ps2.c
@@ -680,14 +680,14 @@ int cypress_init(struct psmouse *psmouse)
struct cytp_data *cytp;
cytp = kzalloc(sizeof(struct cytp_data), GFP_KERNEL);
- psmouse->private = (void *)cytp;
- if (cytp == NULL)
+ if (!cytp)
return -ENOMEM;
- cypress_reset(psmouse);
-
+ psmouse->private = cytp;
psmouse->pktsize = 8;
+ cypress_reset(psmouse);
+
if (cypress_query_hardware(psmouse)) {
psmouse_err(psmouse, "Unable to query Trackpad hardware.\n");
goto err_exit;