]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: rts5139: More appropriate use of sizeof operand
authorFabio Falzoi <fabio.falzoi84@gmail.com>
Tue, 22 Apr 2014 21:23:04 +0000 (23:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 22:20:51 +0000 (15:20 -0700)
Use the pointer rts51x to get the size of the struct.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rts5139/rts51x.c

index 612041005b59918742bb3880a7f07f4b96d67aa3..8529cbabc5542f377bc7c81bb7c945e9f2db6348 100644 (file)
@@ -719,7 +719,7 @@ static int rts51x_probe(struct usb_interface *intf,
 
        pr_debug("%s detected\n", RTS51X_NAME);
 
-       rts51x = kzalloc(sizeof(struct rts51x_usb), GFP_KERNEL);
+       rts51x = kzalloc(sizeof(*rts51x), GFP_KERNEL);
        if (!rts51x)
                return -ENOMEM;