lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 15 Jul 2014 12:17:23 -0700
From:	Anish Bhatt <anish@...lsio.com>
To:	netdev@...r.kernel.org
Cc:	davem@...emloft.net, leedom@...lsio.com, hariprasad@...lsio.com,
	dan.carpenter@...cle.com, Anish Bhatt <anish@...lsio.com>
Subject: [PATCH net-next] cxgb4: Fix static checker warnings 

This patch fixes static checker warnings as pointed out on by Dan Carpenter

Fixes: 76bcb31efc06 ("cxgb4 : Add DCBx support codebase  and dcbnl_ops")
Signed-off-by: Anish Bhatt <anish@...lsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
index a8b1073e6373..8734dfe0da32 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
@@ -676,15 +676,15 @@ static u8 cxgb4_setapp(struct net_device *dev, u8 app_idtype, u16 app_id,
 
 
 	if (pi->dcb.state != CXGB4_DCB_STATE_FW_ALLSYNCED)
-		return -EINVAL;
+		return 0;
 
 	/* DCB info gets thrown away on link up */
 	if (!netif_carrier_ok(dev))
-		return -ENOLINK;
+		return 0;
 
 	if (app_idtype != DCB_APP_IDTYPE_ETHTYPE &&
 	    app_idtype != DCB_APP_IDTYPE_PORTNUM)
-		return -EINVAL;
+		return 0;
 
 	for (i = 0; i < CXGB4_MAX_DCBX_APP_SUPPORTED; i++) {
 		INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id);
@@ -710,7 +710,7 @@ static u8 cxgb4_setapp(struct net_device *dev, u8 app_idtype, u16 app_id,
 	if (i == CXGB4_MAX_DCBX_APP_SUPPORTED) {
 		/* no empty slots available */
 		dev_err(adap->pdev_dev, "DCB app table full\n");
-		return -EBUSY;
+		return 0;
 	}
 
 	/* write out new app table entry */
-- 
2.0.1

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ