From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-eopbgr790083.outbound.protection.outlook.com [40.107.79.83]) by dpdk.org (Postfix) with ESMTP id 08E254CA9 for ; Tue, 12 Mar 2019 16:24:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=AQUANTIA1COM.onmicrosoft.com; s=selector1-aquantia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g7Ii1gRIOIBRycrBzLHNcTdLlen0JqZJaBksU87ef44=; b=C2k/QXJURdDAVAu04eZNPjSDzz0Dc7slfWGj4traU0O0QBxX7EO1pG0e8GYtcteySXa9uAFD/mGZRTXN4Lng3LZjMmWxywKcCMtLPYP693E2WF7Zez9JfXWEPNPNm0lbBa1OOntarHRm9lOnpSzpKovpO7DOwQWFkXFuEsGbN14= Received: from DM6PR11MB3625.namprd11.prod.outlook.com (20.178.230.149) by DM6PR11MB2747.namprd11.prod.outlook.com (20.176.100.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Tue, 12 Mar 2019 15:24:55 +0000 Received: from DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::d145:a1f4:ed34:e31b]) by DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::d145:a1f4:ed34:e31b%3]) with mapi id 15.20.1686.021; Tue, 12 Mar 2019 15:24:55 +0000 From: Igor Russkikh To: "dev@dpdk.org" CC: Pavel Belous , Igor Russkikh Thread-Topic: [PATCH v3 03/10] net/atlantic: extra checks for error codes Thread-Index: AQHU2Oe/hVhsezxOlkGYZSMyPLNwbA== Date: Tue, 12 Mar 2019 15:24:55 +0000 Message-ID: <9878dd7a3e0652025e6cdb4c9e2b6e889e2e33e9.1552402263.git.igor.russkikh@aquantia.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0901CA0050.eurprd09.prod.outlook.com (2603:10a6:3:45::18) To DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Igor.Russkikh@aquantia.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [95.79.108.179] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 273a548b-2ebf-4130-9f5e-08d6a6fee14e x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:DM6PR11MB2747; x-ms-traffictypediagnostic: DM6PR11MB2747: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; DM6PR11MB2747; 23:TQPxj2+cM6EH+xHqTYC1c65u/mydgTxkrMvjlsE?= =?iso-8859-1?Q?F6nj3HbtyJyUiHQuFLHspNcHMv1+vWgVg3++xFtXuOoVccNr1QlifaWGth?= =?iso-8859-1?Q?A2ZAH39+SN0kjSFXEqMj7REMLgx7nGTVs5bqS3QHDGK8LXwa6CYMLOUYP1?= =?iso-8859-1?Q?Ta5fuWvwOxEp5nzoiJ5l27BPEu7tvfivnxnOqbWyJS1ucYHEdvIZkLuJWo?= =?iso-8859-1?Q?XSvUSpHrXnBvPxkqMntp293BGL/ajWS+varZAyercH6VAKL0/9BWJWtoOT?= =?iso-8859-1?Q?1ZU8RlbTYzxl3eD0kjEfaoNgvdoCWY6guml5Mg5b/kLAritcWNnFtlnp+H?= =?iso-8859-1?Q?AVE6/dbeTqJ5FpRcKERtt5OigieSdslNG3dGt4CPutmFiAki7v47WGnCHc?= =?iso-8859-1?Q?5zwiDz1DbQbmpHQq5UHwLNYlL9QkoCKO0CTEHG6wrLBmJ+GaRkvdY96Qbz?= =?iso-8859-1?Q?yBdHs00p2YUmPRPV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=?iso-8859-1?Q?vsYHN5Wo2FZNwXes/0MVxNx07h9DWzmT3bdsvrB+J9/GkLjDo40D+NNI/k?= =?iso-8859-1?Q?n7EGJ33NFcP+/M=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09749A275C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(39850400004)(136003)(366004)(376002)(199004)(189003)(53936002)(2501003)(106356001)(86362001)(81166006)(5660300002)(99286004)(81156014)(6116002)(44832011)(2351001)(105586002)(4326008)(66066001)(2616005)(71200400001)(4744005)(486006)(72206003)(478600001)(446003)(476003)(186003)(118296001)(14454004)(26005)(54906003)(71190400001)(11346002)(386003)(6506007)(305945005)(102836004)(25786009)(7736002)(50226002)(3846002)(256004)(107886003)(316002)(36756003)(6916009)(6486002)(52116002)(1730700003)(8676002)(76176011)(6512007)(97736004)(8936002)(68736007)(6436002)(2906002)(5640700003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR11MB2747; H:DM6PR11MB3625.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: UivdVxVgrC9GlUa9psPO3HobEFhtznkkAaTo/3/Ez3ZThFDcm1k9ILtHgGX2Wvijdx/gtS/m0e+B2uX93QgVLfZxSPhpMNTILPDa1JtlOrIw5D24/tbUPEPKv9Y1l5v5T5g936q3ACIt6he0USosZwGUpbyYDOlEASzTtwNPhppIAqZLDczimbcJcu5A+Wc26/3tfwstUS0qaCnG0Sr/x/eRxDOl4Q7BiaK/NdYtH/UzoBgL1llg8khiGj/RxeAvY8/zI3f8LOPIuQcd7Pvnt4dMJr6X/q6uONZ/RIIttCFdNUXD28chcWp1x1AHBjRwBUIYu+8VmGDRZGSMd6CaLHTC2mcVaJ1tvw4tbFpZDpvjKKjQhv+xMuWLT9WK8VRReNPaLYqcQtxEwSAKJQ/Pu3M3jIlV9Fxn3o/G12sk+7U= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 273a548b-2ebf-4130-9f5e-08d6a6fee14e X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Mar 2019 15:24:55.5947 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2747 Subject: [dpdk-dev] [PATCH v3 03/10] net/atlantic: extra checks for error codes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 15:24:57 -0000 Found by Coverity scan. Checks are useless because at these code places err is always zero. Signed-off-by: Igor Russkikh --- drivers/net/atlantic/hw_atl/hw_atl_utils.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/atlan= tic/hw_atl/hw_atl_utils.c index f11093a50404..13f02b9f99c5 100644 --- a/drivers/net/atlantic/hw_atl/hw_atl_utils.c +++ b/drivers/net/atlantic/hw_atl/hw_atl_utils.c @@ -462,8 +462,6 @@ int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, goto err_exit; } } while (sw.tid !=3D fw.tid || 0xFFFFU =3D=3D fw.len); - if (err < 0) - goto err_exit; =20 if (rpc) { if (fw.len) { @@ -875,8 +873,7 @@ static int aq_fw1x_set_wol(struct aq_hw_s *self, bool w= ol_enabled, u8 *mac) } =20 err =3D hw_atl_utils_fw_rpc_call(self, rpc_size); - if (err < 0) - goto err_exit; + err_exit: return err; } --=20 2.17.1