diff options
author | Miquel Raynal | 2021-12-31 13:28:36 +0100 |
---|---|---|
committer | Miquel Raynal | 2021-12-31 13:28:47 +0100 |
commit | 2dc6de1cd303bf9298eee4b4ad4bbe911e8a8a1d (patch) | |
tree | 67a019e547e509d64798e697a5b511b758cb930d /drivers/mtd | |
parent | 6420ac0af95dbcb2fd8452e2d551ab50e1bbad83 (diff) | |
parent | baaf965f94308301d2dc554d72a87d7432cd5ce6 (diff) |
Merge tag 'cfi/for-5.17' into mtd/next
Hyperbus changes for v5.17-rc1
Hyperbus changes:
Couple of fixes in Renesas hyperbus rpc-if driver to avoid crash on
module remove and for missing check for error value in probe.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/hyperbus/rpc-if.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mtd/hyperbus/rpc-if.c b/drivers/mtd/hyperbus/rpc-if.c index ecb050ba95cd..dc164c18f842 100644 --- a/drivers/mtd/hyperbus/rpc-if.c +++ b/drivers/mtd/hyperbus/rpc-if.c @@ -124,7 +124,9 @@ static int rpcif_hb_probe(struct platform_device *pdev) if (!hyperbus) return -ENOMEM; - rpcif_sw_init(&hyperbus->rpc, pdev->dev.parent); + error = rpcif_sw_init(&hyperbus->rpc, pdev->dev.parent); + if (error) + return error; platform_set_drvdata(pdev, hyperbus); @@ -150,9 +152,9 @@ static int rpcif_hb_remove(struct platform_device *pdev) { struct rpcif_hyperbus *hyperbus = platform_get_drvdata(pdev); int error = hyperbus_unregister_device(&hyperbus->hbdev); - struct rpcif *rpc = dev_get_drvdata(pdev->dev.parent); - rpcif_disable_rpm(rpc); + rpcif_disable_rpm(&hyperbus->rpc); + return error; } |