[media] drxd: use kzalloc in drxd_attach()
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 1 Oct 2015 20:25:15 +0000 (17:25 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sat, 3 Oct 2015 14:44:32 +0000 (11:44 -0300)
This saves a little .text and removes the sizeof(...) style
inconsistency. Use sizeof(*state) in accordance with CodingStyle.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/dvb-frontends/drxd_hard.c

index 34b9441840da297b7104fc63b743424cae7fcf95..445a15c2714fe62af2b22a61e1e78eef64b89d52 100644 (file)
@@ -2950,10 +2950,9 @@ struct dvb_frontend *drxd_attach(const struct drxd_config *config,
 {
        struct drxd_state *state = NULL;
 
-       state = kmalloc(sizeof(struct drxd_state), GFP_KERNEL);
+       state = kzalloc(sizeof(*state), GFP_KERNEL);
        if (!state)
                return NULL;
-       memset(state, 0, sizeof(*state));
 
        state->ops = drxd_ops;
        state->dev = dev;