2010-09-13 22:45:42

by Kim Phillips

[permalink] [raw]
Subject: [PATCH 2/3] crypto: talitos - fix checkpatch warning

WARNING: kfree(NULL) is safe this check is probably not required
+ if (priv->chan[i].fifo)
+ kfree(priv->chan[i].fifo);

Signed-off-by: Kim Phillips <[email protected]>
---
drivers/crypto/talitos.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index d4c1fc2..f22666c 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -2333,8 +2333,7 @@ static int talitos_remove(struct platform_device *ofdev)
talitos_unregister_rng(dev);

for (i = 0; i < priv->num_channels; i++)
- if (priv->chan[i].fifo)
- kfree(priv->chan[i].fifo);
+ kfree(priv->chan[i].fifo);

kfree(priv->chan);

--
1.7.1