aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-09-16 09:01:10 +0530
committerHerbert Xu <herbert@gondor.apana.org.au>2013-09-24 06:02:22 +1000
commit6665ad20f020ffc8c632a4d4744a7550000f611e (patch)
tree3f1e790e1aa93c34773d2edb43fe45d370b02392 /drivers/crypto
parent4903e9694d7681226802aaaffce5500de69230e1 (diff)
downloadlinux-linaro-stable-6665ad20f020ffc8c632a4d4744a7550000f611e.tar.gz
crypto: tegra-aes - Fix NULL pointer dereference
'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@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/tegra-aes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c
index 403282f01af9..33f953091402 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;
}