From: Fabio Estevam <fabio.este...@freescale.com>

>From Documentation/CodingStyle:

"The preferred form for passing a size of a struct is the following:

        p = kmalloc(sizeof(*p), ...);"

, so do as suggested.

Signed-off-by: Fabio Estevam <fabio.este...@freescale.com>
---
 drivers/crypto/caam/ctrl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index 1153417..aab8b2a 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -424,8 +424,7 @@ static int caam_probe(struct platform_device *pdev)
        int pg_size;
        int BLOCK_OFFSET = 0;
 
-       ctrlpriv = devm_kzalloc(&pdev->dev, sizeof(struct caam_drv_private),
-                               GFP_KERNEL);
+       ctrlpriv = devm_kzalloc(&pdev->dev, sizeof(*ctrlpriv), GFP_KERNEL);
        if (!ctrlpriv)
                return -ENOMEM;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to