mtd: Use kasprintf() instead of fixed buffer formatting
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 28 Jun 2018 08:20:11 +0000 (10:20 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Sat, 7 Jul 2018 08:53:45 +0000 (10:53 +0200)
commit48360246162b50e84a6e63ed572fdda5e038518b
treef5ed143d1b0ca4808ab45874c80148cf131f4f40
parent98534a58c8a40cdc9e3bcb04d74719fbcedfeb52
mtd: Use kasprintf() instead of fixed buffer formatting

Using "%4.4X" in the calculation of the buffer size is misleading, as
the format string literal has no relation to the actual size needed.
Hence this is fragile w.r.t. future modification.

As this is not a hot path, fix this by replacing the formatting in a
fixed buffer by kasprintf().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/chips/gen_probe.c