Input: cypress_ps2 - remove useless cast
authorGeyslan G. Bem <geyslan@gmail.com>
Wed, 16 Oct 2013 23:52:14 +0000 (16:52 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 31 Oct 2013 08:01:30 +0000 (01:01 -0700)
Get rid of unnecessary (void *) casting in 'cypress_init' function.

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/cypress_ps2.c

index ef651ccf130f5fa39d8bd6317efed46892dca3e1..1d81a74675018e47ef8253cc0492806a72f160a5 100644 (file)
@@ -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;