From f1b096388308b69fdc4fe54e5952a7f7beb845bb Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 23 Feb 2009 15:26:38 +0000 Subject: remove redundant memset after kzalloc From: Matthias Schwarzott 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 Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/dvb/frontends/s921_module.c | 1 - 1 file changed, 1 deletion(-) (limited to 'linux/drivers/media/dvb/frontends/s921_module.c') diff --git a/linux/drivers/media/dvb/frontends/s921_module.c b/linux/drivers/media/dvb/frontends/s921_module.c index 8ae0676a5..4a673c184 100644 --- a/linux/drivers/media/dvb/frontends/s921_module.c +++ b/linux/drivers/media/dvb/frontends/s921_module.c @@ -233,7 +233,6 @@ struct dvb_frontend* s921_attach(const struct s921_config *config, struct s921_state *state; state = kzalloc(sizeof(struct s921_state), GFP_KERNEL); - memset(state, 0x0, sizeof(struct s921_state)); state->addr = config->i2c_address; state->i2c = i2c; -- cgit v1.2.3