diff options
author | 2022-04-26 16:49:11 +0800 | |
---|---|---|
committer | 2022-04-27 17:15:05 +0200 | |
commit | a28ed09dafee20da51eb26452950839633afd824 (patch) | |
tree | f782e485dd90e00be1b0e854776761092bc11542 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | mtd: rawnand: add support for Toshiba TC58NVG0S3HTA00 NAND flash (diff) | |
download | linux-dev-a28ed09dafee20da51eb26452950839633afd824.tar.xz linux-dev-a28ed09dafee20da51eb26452950839633afd824.zip |
mtd: rawnand: cadence: fix possible null-ptr-deref in cadence_nand_dt_probe()
It will cause null-ptr-deref when using 'res', if platform_get_resource()
returns NULL, so move using 'res' after devm_ioremap_resource() that
will check it to avoid null-ptr-deref.
And use devm_platform_get_and_ioremap_resource() to simplify code.
Fixes: ec4ba01e894d ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220426084913.4021868-1-yangyingliang@huawei.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions