summaryrefslogtreecommitdiff
path: root/drivers/target/iscsi/iscsi_target_auth.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2012-01-11 19:11:29 (GMT)
committerPekka Enberg <penberg@kernel.org>2012-01-11 19:11:29 (GMT)
commit5878cf431ca7233a56819ca6970153ac0b129599 (patch)
treee5d21d04a0b468d2dabbe3a3824f23b5537fc6a7 /drivers/target/iscsi/iscsi_target_auth.c
parent74ee4ef1f901fbb014bdcdc9171d126490ce2b62 (diff)
parentb13683d1cc14d1dd30b8e20f3ebea3f814ad029f (diff)
downloadlinux-fsl-qoriq-5878cf431ca7233a56819ca6970153ac0b129599.tar.xz
Merge branch 'slab/urgent' into slab/for-linus
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_auth.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_auth.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/target/iscsi/iscsi_target_auth.c b/drivers/target/iscsi/iscsi_target_auth.c
index beb3946..1cd6ce3 100644
--- a/drivers/target/iscsi/iscsi_target_auth.c
+++ b/drivers/target/iscsi/iscsi_target_auth.c
@@ -30,9 +30,11 @@
static int chap_string_to_hex(unsigned char *dst, unsigned char *src, int len)
{
- int j = DIV_ROUND_UP(len, 2);
+ int j = DIV_ROUND_UP(len, 2), rc;
- hex2bin(dst, src, j);
+ rc = hex2bin(dst, src, j);
+ if (rc < 0)
+ pr_debug("CHAP string contains non hex digit symbols\n");
dst[j] = '\0';
return j;