diff options
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r-- | drivers/mmc/card/block.c | 4 | ||||
-rw-r--r-- | drivers/mmc/card/mmc_test.c | 12 |
2 files changed, 4 insertions, 12 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index fb387c803205..adf0ed3f2c08 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -259,7 +259,7 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) u32 result; __be32 *blocks; - struct mmc_request mrq; + struct mmc_request mrq = {0}; struct mmc_command cmd = {0}; struct mmc_data data = {0}; unsigned int timeout_us; @@ -300,8 +300,6 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) data.sg = &sg; data.sg_len = 1; - memset(&mrq, 0, sizeof(struct mmc_request)); - mrq.cmd = &cmd; mrq.data = &data; diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index f44762b6e592..35252c1e7a20 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c @@ -246,15 +246,13 @@ static int mmc_test_buffer_transfer(struct mmc_test_card *test, { int ret; - struct mmc_request mrq; + struct mmc_request mrq = {0}; struct mmc_command cmd = {0}; struct mmc_command stop = {0}; struct mmc_data data = {0}; struct scatterlist sg; - memset(&mrq, 0, sizeof(struct mmc_request)); - mrq.cmd = &cmd; mrq.data = &data; mrq.stop = &stop; @@ -728,13 +726,11 @@ static int mmc_test_simple_transfer(struct mmc_test_card *test, struct scatterlist *sg, unsigned sg_len, unsigned dev_addr, unsigned blocks, unsigned blksz, int write) { - struct mmc_request mrq; + struct mmc_request mrq = {0}; struct mmc_command cmd = {0}; struct mmc_command stop = {0}; struct mmc_data data = {0}; - memset(&mrq, 0, sizeof(struct mmc_request)); - mrq.cmd = &cmd; mrq.data = &data; mrq.stop = &stop; @@ -755,15 +751,13 @@ static int mmc_test_simple_transfer(struct mmc_test_card *test, static int mmc_test_broken_transfer(struct mmc_test_card *test, unsigned blocks, unsigned blksz, int write) { - struct mmc_request mrq; + struct mmc_request mrq = {0}; struct mmc_command cmd = {0}; struct mmc_command stop = {0}; struct mmc_data data = {0}; struct scatterlist sg; - memset(&mrq, 0, sizeof(struct mmc_request)); - mrq.cmd = &cmd; mrq.data = &data; mrq.stop = &stop; |