From c2e609599a57926f20b324d05b164aabe9e372ed Mon Sep 17 00:00:00 2001 From: "Geyslan G. Bem" Date: Wed, 16 Oct 2013 16:52:14 -0700 Subject: [PATCH] Input: cypress_ps2 - remove useless cast Get rid of unnecessary (void *) casting in 'cypress_init' function. Signed-off-by: Geyslan G. Bem Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/cypress_ps2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c index ef651ccf130f..1d81a7467501 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; -- 2.30.2