Skip to content

Commit

Permalink
staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_sp…
Browse files Browse the repository at this point in the history
…i_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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ajaykathat authored and gregkh committed Sep 25, 2018
1 parent 110f4b7 commit a944140
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/wilc1000/wilc_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/wilc1000/wilc_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a944140

Please sign in to comment.