diff options
author | Mike Isely <isely@pobox.com> | 2007-01-19 22:37:11 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:34:41 -0500 |
commit | ca545f7c39476c6c4c6e639452180a2b38342669 (patch) | |
tree | e9751274759bcdf51bff577f55a030d4f23dca90 /drivers/media/video/pvrusb2/pvrusb2-context.c | |
parent | eca8ebfc11d1935a7dd4c59cb8defb5bdff44ecd (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-context.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-context.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c index cf129746205d..6bbed88d7867 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-context.c +++ b/drivers/media/video/pvrusb2/pvrusb2-context.c | |||
@@ -83,9 +83,8 @@ struct pvr2_context *pvr2_context_create( | |||
83 | void (*setup_func)(struct pvr2_context *)) | 83 | void (*setup_func)(struct pvr2_context *)) |
84 | { | 84 | { |
85 | struct pvr2_context *mp = NULL; | 85 | struct pvr2_context *mp = NULL; |
86 | mp = kmalloc(sizeof(*mp),GFP_KERNEL); | 86 | mp = kzalloc(sizeof(*mp),GFP_KERNEL); |
87 | if (!mp) goto done; | 87 | if (!mp) goto done; |
88 | memset(mp,0,sizeof(*mp)); | ||
89 | pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_main id=%p",mp); | 88 | pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_main id=%p",mp); |
90 | mp->setup_func = setup_func; | 89 | mp->setup_func = setup_func; |
91 | mutex_init(&mp->mutex); | 90 | mutex_init(&mp->mutex); |