Re: [PATCH v2] crypto: talitos: Prevent panic in probe error path

2015-08-10 Thread Herbert Xu
On Thu, Aug 06, 2015 at 01:45:42PM -0500, Aaron Sierra wrote: > > I just found this drvdata cleanup hasn't been required for a few years, > due to the following commit: > > commit 0998d0631001288a5974afc0b2a5f568bcdecb4d > Author: Hans de Goede > Date: Wed May 23 00:09:34 2012 +0200

Re: [PATCH v2] crypto: talitos: Prevent panic in probe error path

2015-08-06 Thread Aaron Sierra
> For completeness, this patch also sets device drvdata to NULL after > the private structure is freed in talitos_remove(). [snip] > @@ -2745,6 +2754,7 @@ static int talitos_remove(struct platform_device > *ofdev) > iounmap(priv->reg); > > kfree(priv); > + dev_set_drvdata(dev, N

[PATCH v2] crypto: talitos: Prevent panic in probe error path

2015-08-05 Thread Aaron Sierra
The probe error path for this driver, for all intents and purposes, is the talitos_remove() function due to the common "goto err_out". Without this patch applied, talitos_remove() will panic under these two conditions: 1. If the RNG device hasn't been registered via talitos_register_rng() prio