Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Linus Torvalds committed Mar 22, 2007
2 parents 0a14fe6 + 7bc301e commit 7e2f037
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Documentation/crypto/api-intro.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Here's an example of how to use the API:
desc.tfm = tfm;
desc.flags = 0;

if (crypto_hash_digest(&desc, &sg, 2, result))
if (crypto_hash_digest(&desc, sg, 2, result))
fail();

crypto_free_hash(tfm);
Expand Down
4 changes: 2 additions & 2 deletions crypto/scatterwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
memcpy_dir(buf, vaddr, len_this_page, out);
scatterwalk_unmap(vaddr, out);

scatterwalk_advance(walk, nbytes);

if (nbytes == len_this_page)
break;

Expand All @@ -99,7 +101,5 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,

scatterwalk_pagedone(walk, out, 1);
}

scatterwalk_advance(walk, nbytes);
}
EXPORT_SYMBOL_GPL(scatterwalk_copychunks);
2 changes: 1 addition & 1 deletion crypto/tcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ static void test_deflate(void)
tv = (void *)tvmem;

tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC);
if (tfm == NULL) {
if (IS_ERR(tfm)) {
printk("failed to load transform for deflate\n");
return;
}
Expand Down

0 comments on commit 7e2f037

Please sign in to comment.