diff options
author | John Crispin <john@phrozen.org> | 2018-02-21 20:40:50 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2018-03-14 19:04:50 +0100 |
commit | 54b275c8ed3ad20c447fd46deec83384822ac79d (patch) | |
tree | 4198c9f77e467b316940cb78297d3030e67d67ea /target/linux/ipq40xx/patches-4.14/050-0006-mtd-nand-qcom-Add-a-NULL-check-for-devm_kasprintf.patch | |
parent | b7f115f22a9d79bd45bfe27cfb8d491dac49feb4 (diff) | |
download | upstream-54b275c8ed3ad20c447fd46deec83384822ac79d.tar.gz upstream-54b275c8ed3ad20c447fd46deec83384822ac79d.tar.bz2 upstream-54b275c8ed3ad20c447fd46deec83384822ac79d.zip |
ipq40xx: add target
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/ipq40xx/patches-4.14/050-0006-mtd-nand-qcom-Add-a-NULL-check-for-devm_kasprintf.patch')
-rw-r--r-- | target/linux/ipq40xx/patches-4.14/050-0006-mtd-nand-qcom-Add-a-NULL-check-for-devm_kasprintf.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/patches-4.14/050-0006-mtd-nand-qcom-Add-a-NULL-check-for-devm_kasprintf.patch b/target/linux/ipq40xx/patches-4.14/050-0006-mtd-nand-qcom-Add-a-NULL-check-for-devm_kasprintf.patch new file mode 100644 index 0000000000..4ddc0148ad --- /dev/null +++ b/target/linux/ipq40xx/patches-4.14/050-0006-mtd-nand-qcom-Add-a-NULL-check-for-devm_kasprintf.patch @@ -0,0 +1,26 @@ +From 069f05346d01e7298939f16533953cdf52370be3 Mon Sep 17 00:00:00 2001 +From: Fabio Estevam <fabio.estevam@nxp.com> +Date: Fri, 5 Jan 2018 18:02:55 -0200 +Subject: [PATCH 6/7] mtd: nand: qcom: Add a NULL check for devm_kasprintf() + +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> +--- + drivers/mtd/nand/qcom_nandc.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/mtd/nand/qcom_nandc.c ++++ b/drivers/mtd/nand/qcom_nandc.c +@@ -2639,6 +2639,9 @@ static int qcom_nand_host_init(struct qc + + nand_set_flash_node(chip, dn); + mtd->name = devm_kasprintf(dev, GFP_KERNEL, "qcom_nand.%d", host->cs); ++ if (!mtd->name) ++ return -ENOMEM; ++ + mtd->owner = THIS_MODULE; + mtd->dev.parent = dev; + |