From 0c53d8c84047d86169bd4147bb8f5adf2772d2bb Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 12 Dec 2008 22:08:50 -0800 Subject: [PATCH] sfc: Use kzalloc() to ensure struct efx_spi_device is fully initialised Currently the mtd field is not initialised early enough. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- drivers/net/sfc/falcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index df844defc0a..6884dc8c1f8 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c @@ -2690,7 +2690,7 @@ static int falcon_spi_device_init(struct efx_nic *efx, struct efx_spi_device *spi_device; if (device_type != 0) { - spi_device = kmalloc(sizeof(*spi_device), GFP_KERNEL); + spi_device = kzalloc(sizeof(*spi_device), GFP_KERNEL); if (!spi_device) return -ENOMEM; spi_device->device_id = device_id; -- 2.32.0.93.g670b81a890