diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-10-01 17:25:15 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-10-03 11:44:32 -0300 |
commit | f4f24d1fd0803e8b5de5da373276f5046bef7463 (patch) | |
tree | d3b98ca19e39d4496e38e139ccd3dd0c0ae502a8 /drivers/media | |
parent | edf8875f21c34102be54becfb5f435f0b7ca5a65 (diff) | |
download | op-kernel-dev-f4f24d1fd0803e8b5de5da373276f5046bef7463.zip op-kernel-dev-f4f24d1fd0803e8b5de5da373276f5046bef7463.tar.gz |
[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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb-frontends/drxd_hard.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/drxd_hard.c b/drivers/media/dvb-frontends/drxd_hard.c index 34b9441..445a15c 100644 --- a/drivers/media/dvb-frontends/drxd_hard.c +++ b/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; |