staging: comedi: 8255: use kzalloc to allocate the private data
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 13 Jun 2012 22:42:34 +0000 (15:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Jun 2012 00:19:16 +0000 (17:19 -0700)
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/8255.c

index 4cdd007..f6ea493 100644 (file)
@@ -309,7 +309,7 @@ int subdev_8255_init(struct comedi_device *dev, struct comedi_subdevice *s,
 {
        struct subdev_8255_private *spriv;
 
-       spriv = kmalloc(sizeof(*spriv), GFP_KERNEL);
+       spriv = kzalloc(sizeof(*spriv), GFP_KERNEL);
        if (!spriv)
                return -ENOMEM;