Skip to content

Commit e66860c

Browse files
Deepak SaxenaLinus Torvalds
authored andcommitted
[PATCH] drivers/dio: kmalloc + memset -> kzalloc conversion
Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 5c857ee commit e66860c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/dio/dio.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,10 @@ static int __init dio_init(void)
224224
set_fs(fs);
225225

226226
/* Found a board, allocate it an entry in the list */
227-
dev = kmalloc(sizeof(struct dio_dev), GFP_KERNEL);
227+
dev = kzalloc(sizeof(struct dio_dev), GFP_KERNEL);
228228
if (!dev)
229229
return 0;
230230

231-
memset(dev, 0, sizeof(struct dio_dev));
232231
dev->bus = &dio_bus;
233232
dev->dev.parent = &dio_bus.dev;
234233
dev->dev.bus = &dio_bus_type;

0 commit comments

Comments
 (0)