diff options
author | Gary R Hook <gary.hook@amd.com> | 2016-09-28 19:53:47 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-10-02 17:33:44 +0300 |
commit | 9ddb9dc6be095ebe393f7eb582df09cc4847c5e9 (patch) | |
tree | c37ab2aa50e99c2c3a0a607b3af0c0c0855937fa /drivers/crypto/ccp/ccp-dev-v5.c | |
parent | 8df4f27c04c0e061b4b2c142bfbae1602bb1b776 (diff) | |
download | linux-9ddb9dc6be095ebe393f7eb582df09cc4847c5e9.tar.xz |
crypto: ccp - clean up data structure
Change names of data structure instances. Add const
keyword where appropriate. Add error handling path.
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-dev-v5.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-dev-v5.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index f499e34df389..a90ca9e67ade 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -835,10 +835,13 @@ static int ccp5_init(struct ccp_device *ccp) /* Register the DMA engine support */ ret = ccp_dmaengine_register(ccp); if (ret) - goto e_kthread; + goto e_hwrng; return 0; +e_hwrng: + ccp_unregister_rng(ccp); + e_kthread: for (i = 0; i < ccp->cmd_q_count; i++) if (ccp->cmd_q[i].kthread) @@ -994,7 +997,7 @@ static const struct ccp_actions ccp5_actions = { .irqhandler = ccp5_irq_handler, }; -struct ccp_vdata ccpv5 = { +const struct ccp_vdata ccpv5a = { .version = CCP_VERSION(5, 0), .setup = ccp5_config, .perform = &ccp5_actions, @@ -1002,7 +1005,7 @@ struct ccp_vdata ccpv5 = { .offset = 0x0, }; -struct ccp_vdata ccpv5other = { +const struct ccp_vdata ccpv5b = { .version = CCP_VERSION(5, 0), .setup = ccp5other_config, .perform = &ccp5_actions, |