apple-nvme: Release power domains when probe fails
[ Upstream commit eefa72a15e ]
Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bf78e63235
commit
492be1cd9e
@@ -1517,6 +1517,7 @@ static struct apple_nvme *apple_nvme_alloc(struct platform_device *pdev)
|
||||
|
||||
return anv;
|
||||
put_dev:
|
||||
apple_nvme_detach_genpd(anv);
|
||||
put_device(anv->dev);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
@@ -1545,6 +1546,7 @@ static int apple_nvme_probe(struct platform_device *pdev)
|
||||
out_uninit_ctrl:
|
||||
nvme_uninit_ctrl(&anv->ctrl);
|
||||
nvme_put_ctrl(&anv->ctrl);
|
||||
apple_nvme_detach_genpd(anv);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user