mtd: spi-nor: hisi-sfc: Put child node np on error path
authorPan Bian <bianpan2016@163.com>
Thu, 21 Jan 2021 09:18:47 +0000 (01:18 -0800)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Sat, 23 Jan 2021 12:49:52 +0000 (14:49 +0200)
commitfe6653460ee7a7dbe0cd5fd322992af862ce5ab0
tree5b00db3b127ca20ed13c1d24351fd70c1074915f
parentd5802468c358cd421c09355467be36a41ea5b5d6
mtd: spi-nor: hisi-sfc: Put child node np on error path

Put the child node np when it fails to get or register device.

Fixes: e523f11141bd ("mtd: spi-nor: add hisilicon spi-nor flash controller driver")
Cc: stable@vger.kernel.org
Signed-off-by: Pan Bian <bianpan2016@163.com>
[ta: Add Fixes tag and Cc stable]
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20210121091847.85362-1-bianpan2016@163.com
drivers/mtd/spi-nor/controllers/hisi-sfc.c