Commit f4f24d1f authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Mauro Carvalho Chehab

[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: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent edf8875f
...@@ -2950,10 +2950,9 @@ struct dvb_frontend *drxd_attach(const struct drxd_config *config, ...@@ -2950,10 +2950,9 @@ struct dvb_frontend *drxd_attach(const struct drxd_config *config,
{ {
struct drxd_state *state = NULL; struct drxd_state *state = NULL;
state = kmalloc(sizeof(struct drxd_state), GFP_KERNEL); state = kzalloc(sizeof(*state), GFP_KERNEL);
if (!state) if (!state)
return NULL; return NULL;
memset(state, 0, sizeof(*state));
state->ops = drxd_ops; state->ops = drxd_ops;
state->dev = dev; state->dev = dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment