diff options
Diffstat (limited to 'drivers/crypto/caam/jr.c')
-rw-r--r-- | drivers/crypto/caam/jr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index 93d14070141a..b4aa773ecbc8 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c | |||
@@ -407,6 +407,7 @@ int caam_jr_shutdown(struct device *dev) | |||
407 | dma_free_coherent(dev, sizeof(struct jr_outentry) * JOBR_DEPTH, | 407 | dma_free_coherent(dev, sizeof(struct jr_outentry) * JOBR_DEPTH, |
408 | jrp->outring, outbusaddr); | 408 | jrp->outring, outbusaddr); |
409 | kfree(jrp->entinfo); | 409 | kfree(jrp->entinfo); |
410 | of_device_unregister(jrp->jr_pdev); | ||
410 | 411 | ||
411 | return ret; | 412 | return ret; |
412 | } | 413 | } |
@@ -454,6 +455,8 @@ int caam_jr_probe(struct platform_device *pdev, struct device_node *np, | |||
454 | kfree(jrpriv); | 455 | kfree(jrpriv); |
455 | return -EINVAL; | 456 | return -EINVAL; |
456 | } | 457 | } |
458 | |||
459 | jrpriv->jr_pdev = jr_pdev; | ||
457 | jrdev = &jr_pdev->dev; | 460 | jrdev = &jr_pdev->dev; |
458 | dev_set_drvdata(jrdev, jrpriv); | 461 | dev_set_drvdata(jrdev, jrpriv); |
459 | ctrlpriv->jrdev[ring] = jrdev; | 462 | ctrlpriv->jrdev[ring] = jrdev; |
@@ -472,6 +475,7 @@ int caam_jr_probe(struct platform_device *pdev, struct device_node *np, | |||
472 | /* Now do the platform independent part */ | 475 | /* Now do the platform independent part */ |
473 | error = caam_jr_init(jrdev); /* now turn on hardware */ | 476 | error = caam_jr_init(jrdev); /* now turn on hardware */ |
474 | if (error) { | 477 | if (error) { |
478 | of_device_unregister(jr_pdev); | ||
475 | kfree(jrpriv); | 479 | kfree(jrpriv); |
476 | return error; | 480 | return error; |
477 | } | 481 | } |