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
that priv->chan is not NULL in the per-channel FIFO cleanup for loop. For completeness, this patch also sets device drvdata to NULL after the private structure is freed in talitos_remove(). Signed-off-by: Aaron Sierra --- drivers/crypto/talitos.c | 14 -- drivers/crypto/talitos.h |

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

2015-08-05 Thread Aaron Sierra
- Original Message - > From: "Herbert Xu" > Sent: Tuesday, August 4, 2015 7:08:13 PM > > On Tue, Aug 04, 2015 at 09:43:50AM -0500, Aaron Sierra wrote: > > > > You are correct about the leak and I regret introducing that (I am > > also leak

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

2015-08-04 Thread Aaron Sierra
- Original Message - > From: "Herbert Xu" > Sent: Tuesday, August 4, 2015 2:18:05 AM > > On Fri, Jul 31, 2015 at 03:52:18PM -0500, Aaron Sierra wrote: > > > > @@ -2905,8 +2919,7 @@ static int talitos_probe(struct platform_device > > *ofdev) > &g

[PATCH v3] crypto: talitos: Remove zero_entry static initializer

2015-08-03 Thread Aaron Sierra
/talitos.o] Error 1 make[1]: *** [drivers/crypto] Error 2 make: *** [drivers] Error 2 This patch eliminates the errors by relying on the C standard's implicit assignment of zero to static variables. Signed-off-by: Aaron Sierra --- drivers/crypto/talitos.h | 7 +-- 1 file changed, 1 in

Re: [PATCH v2] crypto: talitos: Remove zero_entry static initializer

2015-08-03 Thread Aaron Sierra
- Original Message - > From: "Herbert Xu" > Sent: Monday, August 3, 2015 6:31:20 PM > > On Mon, Aug 03, 2015 at 11:14:37AM -0500, Aaron Sierra wrote: > > Compiling the talitos driver with my GCC 4.3.1 e500v2 cross-compiler > > resulted in a faile

[PATCH v2] crypto: talitos: Remove zero_entry static initializer

2015-08-03 Thread Aaron Sierra
/talitos.o] Error 1 make[1]: *** [drivers/crypto] Error 2 make: *** [drivers] Error 2 This patch eliminates the errors by moving the static constant zero_entry to the talitos_private structure. As a member of that structure, zero_entry gets initialized for free (and compatibly) by the kzalloc()

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

2015-07-31 Thread Aaron Sierra
talitos_remove(). Signed-off-by: Aaron Sierra --- drivers/crypto/talitos.c | 33 +++-- drivers/crypto/talitos.h | 2 +- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 83aca95..684fe89 100644 --- a/drivers

[PATCH] crypto: talitos: Init zero_entry more compatibly

2015-07-31 Thread Aaron Sierra
o] Error 1 make[1]: *** [drivers/crypto] Error 2 make: *** [drivers] Error 2 This patch works around the errors by changing the static constant zero_entry's initializer to use an initialization shorthand. Signed-off-by: Aaron Sierra --- drivers/crypto/talitos.h | 7 +-- 1 file change