diff options
author | Pekka Enberg <penberg@kernel.org> | 2012-01-11 19:11:29 (GMT) |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-01-11 19:11:29 (GMT) |
commit | 5878cf431ca7233a56819ca6970153ac0b129599 (patch) | |
tree | e5d21d04a0b468d2dabbe3a3824f23b5537fc6a7 /drivers/target/iscsi/iscsi_target_auth.c | |
parent | 74ee4ef1f901fbb014bdcdc9171d126490ce2b62 (diff) | |
parent | b13683d1cc14d1dd30b8e20f3ebea3f814ad029f (diff) | |
download | linux-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.c | 6 |
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; |