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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:37 +0000 (11:38 +0100)
commitdf2d431a1ef3b619d91c27d2dcce52b1a5bfd2ec
tree4bdfcf17265ebaeb9f41f27bf242281d52012a5d
parent68ef24e86cf7f3ec63449506bae34d1d7e789935
mtd: spi-nor: hisi-sfc: Put child node np on error path

commit fe6653460ee7a7dbe0cd5fd322992af862ce5ab0 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/spi-nor/controllers/hisi-sfc.c