diff mbox

fix ptr_ret.cocci warnings

Message ID 20150624150049.GA60090@xian (mailing list archive)
State New, archived
Headers show

Commit Message

Fengguang Wu June 24, 2015, 3 p.m. UTC
fs/nfs/nfs42proc.c:191:1-3: WARNING: PTR_ERR_OR_ZERO can be used


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

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 nfs42proc.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -188,7 +188,5 @@  int nfs42_proc_layoutstats_generic(struc
 
 	nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 0);
 	task = rpc_run_task(&task_setup);
-	if (IS_ERR(task))
-		return PTR_ERR(task);
-	return 0;
+	return PTR_ERR_OR_ZERO(task);
 }