mtd: nand: qcom: Add a NULL check for devm_kasprintf()
authorFabio Estevam <fabio.estevam@nxp.com>
Fri, 5 Jan 2018 20:02:55 +0000 (18:02 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2018 16:12:48 +0000 (18:12 +0200)
commit2424869e4cd1d2d08b0c23b709b116d48d1a42aa
tree9fa3640b8c718141d7ec4bfda838563695f003a0
parente5751c84402f62c8d5b30af96b04180c5c0ad48d
mtd: nand: qcom: Add a NULL check for devm_kasprintf()

commit 069f05346d01e7298939f16533953cdf52370be3 upstream.

devm_kasprintf() may fail, so we should better add a NULL check
and propagate an error on failure.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/qcom_nandc.c