Skip to content

Commit

Permalink
Input: cypress_ps2 - remove useless cast
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geyslan G. Bem authored and Dmitry Torokhov committed Oct 31, 2013
1 parent 33777f3 commit c2e6095
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/input/mouse/cypress_ps2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c2e6095

Please sign in to comment.