aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-21 22:45:32 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-21 22:45:32 -0400
commit7e2f037b9226452de60a74e94e5c42d3e54c8637 (patch)
tree43fb239c5f63a3ae5bfea75b639aff9e8816aef5
parent0a14fe6e5efd0af0f9c6c01e0433445d615d0110 (diff)
parent7bc301e97b96597df967f11b9fa9cf391109893a (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6: [CRYPTO] tcrypt: Fix error checking for comp allocation [CRYPTO] doc: Fix typo in hash example [CRYPTO] api: scatterwalk_copychunks() fails to advance through scatterlist
-rw-r--r--Documentation/crypto/api-intro.txt2
-rw-r--r--crypto/scatterwalk.c4
-rw-r--r--crypto/tcrypt.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt
index e41a79aa71ce..9b84b805ab75 100644
--- a/Documentation/crypto/api-intro.txt
+++ b/Documentation/crypto/api-intro.txt
@@ -60,7 +60,7 @@ Here's an example of how to use the API:
60 desc.tfm = tfm; 60 desc.tfm = tfm;
61 desc.flags = 0; 61 desc.flags = 0;
62 62
63 if (crypto_hash_digest(&desc, &sg, 2, result)) 63 if (crypto_hash_digest(&desc, sg, 2, result))
64 fail(); 64 fail();
65 65
66 crypto_free_hash(tfm); 66 crypto_free_hash(tfm);
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index 35172d3f043b..a66423121773 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -91,6 +91,8 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
91 memcpy_dir(buf, vaddr, len_this_page, out); 91 memcpy_dir(buf, vaddr, len_this_page, out);
92 scatterwalk_unmap(vaddr, out); 92 scatterwalk_unmap(vaddr, out);
93 93
94 scatterwalk_advance(walk, nbytes);
95
94 if (nbytes == len_this_page) 96 if (nbytes == len_this_page)
95 break; 97 break;
96 98
@@ -99,7 +101,5 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
99 101
100 scatterwalk_pagedone(walk, out, 1); 102 scatterwalk_pagedone(walk, out, 1);
101 } 103 }
102
103 scatterwalk_advance(walk, nbytes);
104} 104}
105EXPORT_SYMBOL_GPL(scatterwalk_copychunks); 105EXPORT_SYMBOL_GPL(scatterwalk_copychunks);
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index f5e9da319ece..8eaa5aa210b0 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -768,7 +768,7 @@ static void test_deflate(void)
768 tv = (void *)tvmem; 768 tv = (void *)tvmem;
769 769
770 tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC); 770 tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC);
771 if (tfm == NULL) { 771 if (IS_ERR(tfm)) {
772 printk("failed to load transform for deflate\n"); 772 printk("failed to load transform for deflate\n");
773 return; 773 return;
774 } 774 }