aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2007-01-20 00:37:11 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 13:34:41 -0200
commitca545f7c39476c6c4c6e639452180a2b38342669 (patch)
treee9751274759bcdf51bff577f55a030d4f23dca90 /drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
parenteca8ebfc11d1935a7dd4c59cb8defb5bdff44ecd (diff)
V4L/DVB (5091): Pvrusb2: Use kzalloc in place of kmalloc/memset pairs
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-i2c-core.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-i2c-core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
index a28299107be..223a571faff 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
@@ -897,12 +897,11 @@ static int pvr2_i2c_attach_inform(struct i2c_client *client)
struct pvr2_hdw *hdw = (struct pvr2_hdw *)(client->adapter->algo_data);
struct pvr2_i2c_client *cp;
int fl = !(hdw->i2c_pend_types & PVR2_I2C_PEND_ALL);
- cp = kmalloc(sizeof(*cp),GFP_KERNEL);
+ cp = kzalloc(sizeof(*cp),GFP_KERNEL);
trace_i2c("i2c_attach [client=%s @ 0x%x ctxt=%p]",
client->name,
client->addr,cp);
if (!cp) return -ENOMEM;
- memset(cp,0,sizeof(*cp));
cp->hdw = hdw;
INIT_LIST_HEAD(&cp->list);
cp->client = client;