Browse Source

[media] drxd: use kzalloc in drxd_attach()

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>
Rasmus Villemoes 10 years ago
parent
commit
f4f24d1fd0
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/media/dvb-frontends/drxd_hard.c

+ 1 - 2
drivers/media/dvb-frontends/drxd_hard.c

@@ -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;