On Friday, July 04, 2014 at 12:54:06 AM, Kim Phillips wrote:
> On Thu, 3 Jul 2014 15:07:50 +0300
> 
> Cristian Stoica <cristian.sto...@freescale.com> wrote:
> > This patch fixes a memory leak that appears when caam_jr module is
> > unloaded.
> > 
> > Cc: <sta...@vger.kernel.org> # 3.13+
> > Signed-off-by: Cristian Stoica <cristian.sto...@freescale.com>
> > ---
> > 
> >  drivers/crypto/caam/jr.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
> > index 1d80bd3..e0b91fc 100644
> > --- a/drivers/crypto/caam/jr.c
> > +++ b/drivers/crypto/caam/jr.c
> > @@ -453,7 +453,7 @@ static int caam_jr_probe(struct platform_device
> > *pdev)
> > 
> >     int error;
> >     
> >     jrdev = &pdev->dev;
> > 
> > -   jrpriv = kmalloc(sizeof(struct caam_drv_private_jr),
> > +   jrpriv = devm_kzalloc(jrdev, sizeof(struct caam_drv_private_jr),
> > 
> >                      GFP_KERNEL);
> 
> alignment.  Also, why are we replacing a _m_alloc with a _z_alloc?

I am fine with replacing kmalloc with kzalloc in this context.

Best regards,
Marek Vasut
--
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