aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-12-12 22:08:50 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-12 22:08:50 -0800
commit0c53d8c84047d86169bd4147bb8f5adf2772d2bb (patch)
treea3ab165d88e117e7a36e168aea2cb27e314a9de9 /drivers/net/sfc
parentfa402b2ea9cacd1ec94fa77e3efb506a5d034da6 (diff)
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 <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/falcon.c2
1 files changed, 1 insertions, 1 deletions
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;