Use the pointer rts51x to get the size of the struct.

Signed-off-by: Fabio Falzoi <fabio.falzo...@gmail.com>
---
 drivers/staging/rts5139/rts51x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rts5139/rts51x.c b/drivers/staging/rts5139/rts51x.c
index 6120410..8529cba 100644
--- a/drivers/staging/rts5139/rts51x.c
+++ b/drivers/staging/rts5139/rts51x.c
@@ -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;
 
-- 
1.9.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to