diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-05 01:16:00 +0300 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-06 14:38:00 -0500 |
commit | 2d66806d740eeb410aa785bd7fba3bd24bb082c1 (patch) | |
tree | 7e38e871b3848253ac64166d2ddad02461e86c15 /drivers/net/chelsio | |
parent | d033d9345101c07aa6965590109eac0bf7f25b8d (diff) | |
download | kernel_samsung_smdk4412-2d66806d740eeb410aa785bd7fba3bd24bb082c1.zip kernel_samsung_smdk4412-2d66806d740eeb410aa785bd7fba3bd24bb082c1.tar.gz kernel_samsung_smdk4412-2d66806d740eeb410aa785bd7fba3bd24bb082c1.tar.bz2 |
[PATCH] chelsio: fix kmalloc failure in t1_espi_create
memset() is called before check.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/chelsio')
-rw-r--r-- | drivers/net/chelsio/espi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/chelsio/espi.c b/drivers/net/chelsio/espi.c index 2306425..e824aca 100644 --- a/drivers/net/chelsio/espi.c +++ b/drivers/net/chelsio/espi.c @@ -296,9 +296,7 @@ void t1_espi_destroy(struct peespi *espi) struct peespi *t1_espi_create(adapter_t *adapter) { - struct peespi *espi = kmalloc(sizeof(*espi), GFP_KERNEL); - - memset(espi, 0, sizeof(*espi)); + struct peespi *espi = kzalloc(sizeof(*espi), GFP_KERNEL); if (espi) espi->adapter = adapter; |