aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/cx24116.c
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2009-02-23 10:26:38 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:52 -0400
commit8420fa7ee22c1d681549ff7ab0466ceda5a911c2 (patch)
tree62e85db6e66870efa58df24dd69a9c2f8784e5d1 /drivers/media/dvb/frontends/cx24116.c
parent51ca3bddf34bb6cdbdddd89f59fe3a0131d40eba (diff)
V4L/DVB (10662): remove redundant memset after kzalloc
Hi there! While having a look at the allocation of struct dvb_frontend in *_attach functions, I found some cases calling memset after kzalloc. This is redundant, and the attached patch removes these calls. I also changed one case calling kmalloc and memset to kzalloc. Regards Matthias Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/cx24116.c')
-rw-r--r--drivers/media/dvb/frontends/cx24116.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/cx24116.c b/drivers/media/dvb/frontends/cx24116.c
index ba1e24c82272..9b9f57264cef 100644
--- a/drivers/media/dvb/frontends/cx24116.c
+++ b/drivers/media/dvb/frontends/cx24116.c
@@ -1112,13 +1112,10 @@ struct dvb_frontend *cx24116_attach(const struct cx24116_config *config,
1112 dprintk("%s\n", __func__); 1112 dprintk("%s\n", __func__);
1113 1113
1114 /* allocate memory for the internal state */ 1114 /* allocate memory for the internal state */
1115 state = kmalloc(sizeof(struct cx24116_state), GFP_KERNEL); 1115 state = kzalloc(sizeof(struct cx24116_state), GFP_KERNEL);
1116 if (state == NULL) 1116 if (state == NULL)
1117 goto error1; 1117 goto error1;
1118 1118
1119 /* setup the state */
1120 memset(state, 0, sizeof(struct cx24116_state));
1121
1122 state->config = config; 1119 state->config = config;
1123 state->i2c = i2c; 1120 state->i2c = i2c;
1124 1121