From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM05-CO1-obe.outbound.protection.outlook.com (mail-eopbgr720087.outbound.protection.outlook.com [40.107.72.87]) by dpdk.org (Postfix) with ESMTP id 6D86F2C2F for ; Sat, 9 Mar 2019 15:03:29 +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=vu/fY1Vq4A8WBYeFV/Z4hkLgb4BSze42CA15U5sLgbWGneuTcPxAH8HnssBZEvhD+0yPBgKQorOv6TcQpSNTigSP70V9vMkNNbeQ5FHFlgtuo5/sqQ2JFC6AnATkzj5axUIeqnzFxJX8CbnbLk12C1ZTExqPDttju2ejTS8h+7A= Received: from DM6PR11MB3625.namprd11.prod.outlook.com (20.178.230.149) by DM6PR11MB2892.namprd11.prod.outlook.com (20.177.216.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Sat, 9 Mar 2019 14:03:28 +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.1665.020; Sat, 9 Mar 2019 14:03:28 +0000 From: Igor Russkikh To: "dev@dpdk.org" CC: Pavel Belous , Igor Russkikh Thread-Topic: [PATCH v2 03/10] net/atlantic: extra checks for error codes Thread-Index: AQHU1oDejtsP81sFbkOt51GZEFCMdQ== Date: Sat, 9 Mar 2019 14:03:28 +0000 Message-ID: <925d69d6e50ad1df50e703bd5783e0da96dc8c77.1552138867.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: HE1PR05CA0278.eurprd05.prod.outlook.com (2603:10a6:3:fc::30) 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: 3e998e3a-26b1-4fb4-0d2d-08d6a49800ed x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:DM6PR11MB2892; x-ms-traffictypediagnostic: DM6PR11MB2892: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; DM6PR11MB2892; 23:jXhPKMmyFbaG0YoBEcmapX/KjFmrHdt0YfimjGQ?= =?iso-8859-1?Q?gVJh12M2RxE4RRv+tDiHjlqZmTv21PYK9LhEL9HF3VQ2tCayzAmCWlAEdc?= =?iso-8859-1?Q?fX3qn2fTrEsuykpWhRV9MOnnSYSlCUAr4I9mXN2PfBXDu7IgmPKFWzWe9T?= =?iso-8859-1?Q?D+RGZ+t/Wso2n7E6yRHAPNz+z/w4eKKbediDzD9uYsYV4FXRmuEdU6hEZu?= =?iso-8859-1?Q?jbtH9BHOKX14YqATvJ1FgztmPCVjGFxe/K7I2JKA8qMv6iuh/PI83bvWAW?= =?iso-8859-1?Q?lX+JjAuXFeh/EeQUR6ltTyYQwU0BAkR0s4sMQaBAgVzzNW0qfmSOcvSxQO?= =?iso-8859-1?Q?hUSEke6U0oeOKTBGx1O+72iGNKUisa5a9rmPZ64jKOn528WGOmiBlRKTUe?= =?iso-8859-1?Q?5Uwrz9XWYPpRRsKR1jwr5cWefEIISlHbVcJKY/unfviV3H6SjssCT0wSTL?= =?iso-8859-1?Q?sAKt0u/fI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so-8859-1?Q?xKvE2v1oRGpjT1XKBuO6xnU8Fd9dPVvQlMQYJ2gJQiN/WEm/0p/atwlQbh?= =?iso-8859-1?Q?O+dbNH6YqYGNXM=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 0971922F40 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(39850400004)(136003)(346002)(199004)(189003)(106356001)(5660300002)(6116002)(26005)(4326008)(99286004)(52116002)(2906002)(3846002)(76176011)(107886003)(2351001)(105586002)(14454004)(102836004)(97736004)(476003)(68736007)(44832011)(386003)(186003)(486006)(11346002)(446003)(2616005)(6506007)(25786009)(2501003)(86362001)(305945005)(7736002)(72206003)(8676002)(6486002)(256004)(118296001)(316002)(8936002)(66066001)(6436002)(81156014)(1730700003)(4744005)(53936002)(5640700003)(81166006)(50226002)(71190400001)(6916009)(54906003)(36756003)(71200400001)(478600001)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR11MB2892; 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: sVoRfoA18k7uG1uUhWK71fMNJ51a6++ECn9l4eD9TRwGvOMNAp5Z6E4dedXWxUsI6kBX6aS09PK7kyouU0Bp8aEphXotwAqfoB0Ja5cx/jl4cHQxweSt6igjNltSP6SI4gucBHFo1sQ7hMEqnnUPCsr50U1bUrEI3U0s90cp/h4Jm19noLSVU7vHM5dZEbZCdpvACz6i7csHOFhQB+lAGwJ1buyX9wGlCDSE08gNqzoTt86fmMwbMaxM/N5nwsXXuuH9U0lpcuAHoq8Ia5Jzfgr7eoANWlVNWTboR3zYUWtc7lvBFrL7UaL0lO0nIMyTTvvxcsapVV9ri+Gkjh9yh3u9eICBHV7vIMRHDFmfp7RvYMZBPoF7VyjjOLuGoaftPhTyb+g7Y5leTNXrY4UPaCuNn3YPBkR9wDHj/jujLiA= 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: 3e998e3a-26b1-4fb4-0d2d-08d6a49800ed X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2019 14:03:28.1336 (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: DM6PR11MB2892 Subject: [dpdk-dev] [PATCH v2 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: Sat, 09 Mar 2019 14:03:30 -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