summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp/ccp-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/ccp/ccp-pci.c')
-rw-r--r--drivers/crypto/ccp/ccp-pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/ccp-pci.c b/drivers/crypto/ccp/ccp-pci.c
index f08c16d370c..93319f9db75 100644
--- a/drivers/crypto/ccp/ccp-pci.c
+++ b/drivers/crypto/ccp/ccp-pci.c
@@ -267,6 +267,9 @@ static void ccp_pci_remove(struct pci_dev *pdev)
struct device *dev = &pdev->dev;
struct ccp_device *ccp = dev_get_drvdata(dev);
+ if (!ccp)
+ return;
+
ccp_destroy(ccp);
pci_iounmap(pdev, ccp->io_map);