linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] crypto: tegra-aes: Fix NULL pointer dereference
@ 2013-09-16  3:31 Sachin Kamat
  2013-09-16  3:31 ` [PATCH 2/2] crypto: tegra-aes: Use devm_clk_get Sachin Kamat
       [not found] ` <1379302271-22438-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Sachin Kamat @ 2013-09-16  3:31 UTC (permalink / raw)
  To: linux-crypto-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	sachin.kamat-QSEj5FYQhm4dnm+yROfE0A

'dd' is tested for NULL. However, it is derefenced in the error
message print. Change the print to pr_err to avoid this.

Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 drivers/crypto/tegra-aes.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c
index 403282f..33f9530 100644
--- a/drivers/crypto/tegra-aes.c
+++ b/drivers/crypto/tegra-aes.c
@@ -27,6 +27,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/errno.h>
@@ -716,7 +718,7 @@ static int tegra_aes_rng_reset(struct crypto_rng *tfm, u8 *seed,
 	u8 *dt;
 
 	if (!ctx || !dd) {
-		dev_err(dd->dev, "ctx=0x%x, dd=0x%x\n",
+		pr_err("ctx=0x%x, dd=0x%x\n",
 			(unsigned int)ctx, (unsigned int)dd);
 		return -EINVAL;
 	}
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-23 20:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16  3:31 [PATCH 1/2] crypto: tegra-aes: Fix NULL pointer dereference Sachin Kamat
2013-09-16  3:31 ` [PATCH 2/2] crypto: tegra-aes: Use devm_clk_get Sachin Kamat
     [not found] ` <1379302271-22438-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-09-23 20:09   ` [PATCH 1/2] crypto: tegra-aes - Fix NULL pointer dereference Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).