OSDN Git Service

mtd: rawnand: cafe: fix drivers probe/remove methods
authorPeng Wu <wupeng58@huawei.com>
Fri, 20 May 2022 08:44:25 +0000 (08:44 +0000)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 6 Jun 2022 12:58:24 +0000 (14:58 +0200)
commit18178e03b124b0c6be17abbbca914157642f5d7a
tree77be9107c2cfb40e85a1ef705f1c47bb326fba3e
parentf2906aa863381afb0015a9eb7fefad885d4e5a56
mtd: rawnand: cafe: fix drivers probe/remove methods

Driver should call pci_disable_device() if it returns from
cafe_nand_probe() with error.

Meanwhile, the driver calls pci_enable_device() in
cafe_nand_probe(), but never calls pci_disable_device()
during removal.

Signed-off-by: Peng Wu <wupeng58@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220520084425.116686-1-wupeng58@huawei.com
drivers/mtd/nand/raw/cafe_nand.c