From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F05CC433E8 for ; Tue, 14 Jul 2020 21:03:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7645B2064C for ; Tue, 14 Jul 2020 21:03:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726996AbgGNVDY (ORCPT ); Tue, 14 Jul 2020 17:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726795AbgGNVDY (ORCPT ); Tue, 14 Jul 2020 17:03:24 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C84DC061755 for ; Tue, 14 Jul 2020 14:03:24 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id B20B115E2C7DC; Tue, 14 Jul 2020 14:03:23 -0700 (PDT) Date: Tue, 14 Jul 2020 14:03:23 -0700 (PDT) Message-Id: <20200714.140323.590389609923321569.davem@davemloft.net> To: dan.carpenter@oracle.com Cc: george.kennedy@oracle.com, kuba@kernel.org, dhaval.giani@oracle.com, netdev@vger.kernel.org Subject: Re: [PATCH 1/1] ax88172a: fix ax88172a_unbind() failures From: David Miller In-Reply-To: <20200714080038.GX2571@kadam> References: <1594641537-1288-1-git-send-email-george.kennedy@oracle.com> <20200713.170859.794084104671494668.davem@davemloft.net> <20200714080038.GX2571@kadam> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 14 Jul 2020 14:03:23 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Dan Carpenter Date: Tue, 14 Jul 2020 11:00:38 +0300 > On Mon, Jul 13, 2020 at 05:08:59PM -0700, David Miller wrote: >> From: George Kennedy >> Date: Mon, 13 Jul 2020 07:58:57 -0400 >> >> > @@ -237,6 +237,8 @@ static int ax88172a_bind(struct usbnet *dev, struct usb_interface *intf) >> > >> > free: >> > kfree(priv); >> > + if (ret >= 0) >> > + ret = -EIO; >> > return ret; >> >> Success paths reach here, so ">= 0" is not appropriate. Maybe you >> meant "> 0"? > > No, the success path is the "return 0;" one line before the start of the > diff. This is always a failure path. Is zero ever a possibility, therefore? You have two cases, one with an explicit -EIO and another which jumps here "if (ret)" So it seems the answer is no.