diff mbox

qed: fix simple_return.cocci warnings

Message ID 20150930133328.GA193090@lkp-ib03
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

kernel test robot Sept. 30, 2015, 1:33 p.m. UTC
drivers/net/ethernet/qlogic/qed/qed_spq.c:673:1-3: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.

Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 qed_spq.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" 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/drivers/net/ethernet/qlogic/qed/qed_spq.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_spq.c
@@ -670,13 +670,9 @@  static int qed_spq_pend_post(struct qed_
 		qed_spq_add_entry(p_hwfn, p_ent, p_ent->priority);
 	}
 
-	rc = qed_spq_post_list(p_hwfn,
+	return qed_spq_post_list(p_hwfn,
 			       &p_spq->pending,
 			       SPQ_HIGH_PRI_RESERVE_DEFAULT);
-	if (rc)
-		return rc;
-
-	return 0;
 }
 
 int qed_spq_post(struct qed_hwfn	*p_hwfn,