From patchwork Tue May 18 15:34:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirley Ma X-Patchwork-Id: 100523 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4IFZX3l026389 for ; Tue, 18 May 2010 15:35:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757227Ab0ERPe5 (ORCPT ); Tue, 18 May 2010 11:34:57 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:50718 "EHLO e5.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755561Ab0ERPex (ORCPT ); Tue, 18 May 2010 11:34:53 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e5.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id o4IFIkwi018999; Tue, 18 May 2010 11:18:46 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o4IFYqtr120432; Tue, 18 May 2010 11:34:52 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o4IFYpOM029191; Tue, 18 May 2010 12:34:52 -0300 Received: from [9.76.208.251] (sig-9-76-208-251.mts.ibm.com [9.76.208.251]) by d01av03.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o4IFYnON029089; Tue, 18 May 2010 12:34:50 -0300 Subject: [PATCH net-next] ixgbe: return error in set_rar when index out of range From: Shirley Ma To: jeffrey.t.kirsher@intel.com Cc: davem@davemloft.net, kvm@vger.kernel.org, netdev@vger.kernel.org, e1000-devel@lists.sourceforge.net Date: Tue, 18 May 2010 08:34:48 -0700 Message-ID: <1274196888.8701.2.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 18 May 2010 15:35:33 +0000 (UTC) diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 1159d91..77b3cf4 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c @@ -1188,6 +1188,7 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); } else { hw_dbg(hw, "RAR index %d is out of range.\n", index); + return -1; }