summaryrefslogtreecommitdiff
path: root/drivers/mmc/card
diff options
context:
space:
mode:
authorJiebingLi <jiebing.li@intel.com>2010-06-17 15:58:46 +0100
committerChris Ball <cjb@laptop.org>2010-10-23 21:11:11 +0800
commit12578f66b9058e63f193fbfe1552e1d1bfa361bb (patch)
tree887d13de57646ae6debc250f03b858d9e67bd30c /drivers/mmc/card
parent53f3a9e26ed5a94bd3caf732e7635692cd3c4402 (diff)
downloadlinux-12578f66b9058e63f193fbfe1552e1d1bfa361bb.tar.gz
linux-12578f66b9058e63f193fbfe1552e1d1bfa361bb.tar.xz
mmc: Use snprintf, not sprintf.
Fix an issue found by klockwork. Just paranoia. Signed-off-by: JiebingLi <jiebing.li@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r--drivers/mmc/card/block.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 00073b7c0368..759a105cb216 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -620,7 +620,8 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
* messages to tell when the card is present.
*/
- sprintf(md->disk->disk_name, "mmcblk%d", devidx);
+ snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
+ "mmcblk%d", devidx);
blk_queue_logical_block_size(md->queue.queue, 512);