提交 f4f24d1f 编写于 作者: R Rasmus Villemoes 提交者: 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: NRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 edf8875f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册