From 67822649d7305caf3dd50ed46c27b99c94eff996 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Wed, 5 Jun 2013 16:27:51 +0800 Subject: crypto: crct10dif - Use PTR_RET 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 Signed-off-by: Herbert Xu --- lib/crc-t10dif.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/crc-t10dif.c') diff --git a/lib/crc-t10dif.c b/lib/crc-t10dif.c index 0cb64634f513..fe3428c07b47 100644 --- a/lib/crc-t10dif.c +++ b/lib/crc-t10dif.c @@ -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) -- cgit v1.2.1