Skip to content

Commit

Permalink
crypto: crct10dif - Use PTR_RET
Browse files Browse the repository at this point in the history
lib/crc-t10dif.c:42:1-3: WARNING: PTR_RET can be used

 Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR

Generated by: coccinelle/api/ptr_ret.cocci

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
herbertx committed Jun 5, 2013
1 parent bbb85b2 commit 6782264
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/crc-t10dif.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ EXPORT_SYMBOL(crc_t10dif);
static int __init crc_t10dif_mod_init(void)
{
crct10dif_tfm = crypto_alloc_shash("crct10dif", 0, 0);
if (IS_ERR(crct10dif_tfm))
return PTR_ERR(crct10dif_tfm);
return 0;
return PTR_RET(crct10dif_tfm);
}

static void __exit crc_t10dif_mod_fini(void)
Expand Down

0 comments on commit 6782264

Please sign in to comment.