sensor: initialize the virtio sersor structure
authorSooyoung Ha <yoosah.ha@samsung.com>
Tue, 12 Jul 2016 05:59:27 +0000 (14:59 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Tue, 12 Jul 2016 09:18:31 +0000 (18:18 +0900)
Change-Id: Id40ec6491ca92afa3bf31e4a8daaa236e1445082
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
(cherry picked from commit 3ee8d369e1bad2ee4139da5e65bf7a836a375249)

drivers/maru/sensors/maru_virtio_sensor.c

index 6bc38aad3f3bf591a837f3034a7364ddd0630281..3b7b06017a75b1779a7a94b98830e31e33c0186c 100644 (file)
@@ -426,7 +426,7 @@ static int sensor_probe(struct virtio_device* dev)
 
        INFO("Sensor probe starts");
 
-       vs = kmalloc(sizeof(struct virtio_sensor), GFP_KERNEL);
+       vs = kzalloc(sizeof(struct virtio_sensor), GFP_KERNEL);
        if (!vs) {
                ERR("failed to allocate sensor structure.");
                return -ENOMEM;