diff options
Diffstat (limited to 'drivers/media/video/cpia2')
-rw-r--r-- | drivers/media/video/cpia2/cpia2_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/video/cpia2/cpia2_core.c b/drivers/media/video/cpia2/cpia2_core.c index 55aab8d38880..a76bd786cf13 100644 --- a/drivers/media/video/cpia2/cpia2_core.c +++ b/drivers/media/video/cpia2/cpia2_core.c | |||
@@ -2224,15 +2224,13 @@ struct camera_data *cpia2_init_camera_struct(void) | |||
2224 | { | 2224 | { |
2225 | struct camera_data *cam; | 2225 | struct camera_data *cam; |
2226 | 2226 | ||
2227 | cam = kmalloc(sizeof(*cam), GFP_KERNEL); | 2227 | cam = kzalloc(sizeof(*cam), GFP_KERNEL); |
2228 | 2228 | ||
2229 | if (!cam) { | 2229 | if (!cam) { |
2230 | ERR("couldn't kmalloc cpia2 struct\n"); | 2230 | ERR("couldn't kmalloc cpia2 struct\n"); |
2231 | return NULL; | 2231 | return NULL; |
2232 | } | 2232 | } |
2233 | 2233 | ||
2234 | /* Default everything to 0 */ | ||
2235 | memset(cam, 0, sizeof(struct camera_data)); | ||
2236 | 2234 | ||
2237 | cam->present = 1; | 2235 | cam->present = 1; |
2238 | mutex_init(&cam->busy_lock); | 2236 | mutex_init(&cam->busy_lock); |