diff options
Diffstat (limited to 'drivers/input/joystick/tmdc.c')
-rw-r--r-- | drivers/input/joystick/tmdc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/joystick/tmdc.c b/drivers/input/joystick/tmdc.c index 93562ecc0ca1..514b1026e379 100644 --- a/drivers/input/joystick/tmdc.c +++ b/drivers/input/joystick/tmdc.c @@ -348,7 +348,8 @@ static int tmdc_connect(struct gameport *gameport, struct gameport_driver *drv) int i; int err; - if (!(tmdc = kzalloc(sizeof(struct tmdc), GFP_KERNEL))) + tmdc = kzalloc(sizeof(*tmdc), GFP_KERNEL); + if (!tmdc) return -ENOMEM; tmdc->gameport = gameport; |