diff options
Diffstat (limited to 'drivers/mmc/card/mmc_test.c')
-rw-r--r-- | drivers/mmc/card/mmc_test.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index abc1a63bcc5..95c298faeb4 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c | |||
@@ -212,7 +212,7 @@ static int mmc_test_busy(struct mmc_command *cmd) | |||
212 | static int mmc_test_wait_busy(struct mmc_test_card *test) | 212 | static int mmc_test_wait_busy(struct mmc_test_card *test) |
213 | { | 213 | { |
214 | int ret, busy; | 214 | int ret, busy; |
215 | struct mmc_command cmd; | 215 | struct mmc_command cmd = {0}; |
216 | 216 | ||
217 | busy = 0; | 217 | busy = 0; |
218 | do { | 218 | do { |
@@ -247,16 +247,14 @@ static int mmc_test_buffer_transfer(struct mmc_test_card *test, | |||
247 | int ret; | 247 | int ret; |
248 | 248 | ||
249 | struct mmc_request mrq; | 249 | struct mmc_request mrq; |
250 | struct mmc_command cmd; | 250 | struct mmc_command cmd = {0}; |
251 | struct mmc_command stop; | 251 | struct mmc_command stop = {0}; |
252 | struct mmc_data data; | 252 | struct mmc_data data; |
253 | 253 | ||
254 | struct scatterlist sg; | 254 | struct scatterlist sg; |
255 | 255 | ||
256 | memset(&mrq, 0, sizeof(struct mmc_request)); | 256 | memset(&mrq, 0, sizeof(struct mmc_request)); |
257 | memset(&cmd, 0, sizeof(struct mmc_command)); | ||
258 | memset(&data, 0, sizeof(struct mmc_data)); | 257 | memset(&data, 0, sizeof(struct mmc_data)); |
259 | memset(&stop, 0, sizeof(struct mmc_command)); | ||
260 | 258 | ||
261 | mrq.cmd = &cmd; | 259 | mrq.cmd = &cmd; |
262 | mrq.data = &data; | 260 | mrq.data = &data; |
@@ -732,14 +730,12 @@ static int mmc_test_simple_transfer(struct mmc_test_card *test, | |||
732 | unsigned blocks, unsigned blksz, int write) | 730 | unsigned blocks, unsigned blksz, int write) |
733 | { | 731 | { |
734 | struct mmc_request mrq; | 732 | struct mmc_request mrq; |
735 | struct mmc_command cmd; | 733 | struct mmc_command cmd = {0}; |
736 | struct mmc_command stop; | 734 | struct mmc_command stop = {0}; |
737 | struct mmc_data data; | 735 | struct mmc_data data; |
738 | 736 | ||
739 | memset(&mrq, 0, sizeof(struct mmc_request)); | 737 | memset(&mrq, 0, sizeof(struct mmc_request)); |
740 | memset(&cmd, 0, sizeof(struct mmc_command)); | ||
741 | memset(&data, 0, sizeof(struct mmc_data)); | 738 | memset(&data, 0, sizeof(struct mmc_data)); |
742 | memset(&stop, 0, sizeof(struct mmc_command)); | ||
743 | 739 | ||
744 | mrq.cmd = &cmd; | 740 | mrq.cmd = &cmd; |
745 | mrq.data = &data; | 741 | mrq.data = &data; |
@@ -762,16 +758,14 @@ static int mmc_test_broken_transfer(struct mmc_test_card *test, | |||
762 | unsigned blocks, unsigned blksz, int write) | 758 | unsigned blocks, unsigned blksz, int write) |
763 | { | 759 | { |
764 | struct mmc_request mrq; | 760 | struct mmc_request mrq; |
765 | struct mmc_command cmd; | 761 | struct mmc_command cmd = {0}; |
766 | struct mmc_command stop; | 762 | struct mmc_command stop = {0}; |
767 | struct mmc_data data; | 763 | struct mmc_data data; |
768 | 764 | ||
769 | struct scatterlist sg; | 765 | struct scatterlist sg; |
770 | 766 | ||
771 | memset(&mrq, 0, sizeof(struct mmc_request)); | 767 | memset(&mrq, 0, sizeof(struct mmc_request)); |
772 | memset(&cmd, 0, sizeof(struct mmc_command)); | ||
773 | memset(&data, 0, sizeof(struct mmc_data)); | 768 | memset(&data, 0, sizeof(struct mmc_data)); |
774 | memset(&stop, 0, sizeof(struct mmc_command)); | ||
775 | 769 | ||
776 | mrq.cmd = &cmd; | 770 | mrq.cmd = &cmd; |
777 | mrq.data = &data; | 771 | mrq.data = &data; |