From: Ajay Singh Date: Tue, 25 Sep 2018 06:23:38 +0000 (+0530) Subject: staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init() X-Git-Tag: microblaze-v5.0-rc1~82^2~277 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=a944140250ce2f200d2b54fa7ec03aad4a5d6901;p=linux-2.6-microblaze.git staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init() Cleanup changes to avoid unnecessary setting 'wilc->bus_data' value to zero as the buffer was allocated using kzalloc(). Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 7ef047c21bae..ca351c950344 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -689,10 +689,8 @@ static int sdio_init(struct wilc *wilc, bool resume) int loop, ret; u32 chipid; - if (!resume) { - memset(sdio_priv, 0, sizeof(struct wilc_sdio)); + if (!resume) sdio_priv->irq_gpio = wilc->dev_irq_num; - } /** * function 0 csa enable diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 2559cf02bff7..cef127b249fb 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -838,12 +838,9 @@ static int wilc_spi_init(struct wilc *wilc, bool resume) return 1; } - memset(spi_priv, 0, sizeof(struct wilc_spi)); - /* * configure protocol */ - spi_priv->crc_off = 0; /* * TODO: We can remove the CRC trials if there is a definite