Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp1090439pxb; Fri, 13 Aug 2021 13:18:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcK6ICsT2pxQC6H8Tdw/xrnubShfVmcfonrRyowQjl4pKBWpvy0XDMaCcXkrHsnD2G9MSk X-Received: by 2002:a17:907:1199:: with SMTP id uz25mr4238851ejb.448.1628885921762; Fri, 13 Aug 2021 13:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628885921; cv=none; d=google.com; s=arc-20160816; b=o4e1K5PTySv1ZccSACpn+uTep9K7CNhhxtdNcvkWN/qwEhJiX1s49DiSb4SysN10B0 r+EglRKalXyB00ln7BY7BmmglV//eBB7VHTifq4J+kzEz+R9nSQzi0ZI3RSgJrCcFc54 zHw+AAkbCjkow/+ZKvGtTbUFA02kSexXiMy4Ij7+VdkIlYkWMBaSshDmwFdwUS/sATCl 5Dk461DPOXAfENUbIBpvf5jKCthCgf1f7OH1gT1iZ+/2MUc1mukOX15kqX/CwSThHXFY oAriUgeXS8s1NnLMoHpXdPigNr8egqWE34zMnCZLDYF0FFLGSXALfOimARun3d8pLtGT my3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=J89z9iDjMSQP+YSlZtcHV2wxo+nbfKKBLdM1u0W92zA=; b=BqMzWujgAkw9VJxKoSsYPcXfmTF/i8/R3ufhxw17DPZGr9xnJ2gaIlnGdXcKblu4hC mq2ysbhL2fCzHhZI7PJoT2XzAmqgCyYp4LPrpHp7dMi0VARu7qmjDSEhJaQEbqLVN9OH MhYVShEjBSAoMmt/eVo8nKsBMwQlvWp0aOdzuA4OT9AM6++Zn1s8wgKFhjdfY99vtHw7 TfdTzeZAxSdeA24XKvKc8LxFi3v4P7V5S7AO/8h6F5sbnhNFjTAX8ReEu7vfR4FyeKeD lQMocVlfZcGBE2zGbZsSkpGt1pFUpJzVh0v1XzSnjq+twPX8fl9ixgkQFEPV16We1qT/ GnWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aeN6dhhH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si2275509ejr.382.2021.08.13.13.18.10; Fri, 13 Aug 2021 13:18:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aeN6dhhH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234344AbhHMUPD (ORCPT + 99 others); Fri, 13 Aug 2021 16:15:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:41738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234079AbhHMUPA (ORCPT ); Fri, 13 Aug 2021 16:15:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D2BD6109E; Fri, 13 Aug 2021 20:14:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628885673; bh=oHqr9gf6iJE6sAUL+WaaVHLwy6uNjlOmXgVB7pQvDag=; h=From:To:Cc:Subject:Date:From; b=aeN6dhhH/cdXVWFowFxc2MAfPoKZIZl78+2FcNIYAKibg8GDD5I2dPjg6UTKK1AOq rpNXph0ZMfsgx4ZVi0TqPfs0LeZK+Lw97REu3XwAoPEDArqtZb2QF5eZsbS4bJEcKu ayCMVmbJNHzz+sCBy5+l5hbnaWR5lgFO9STi2p9ZLvCleelTaYtcyr2UVTc1QPsYyQ BdaxCpLDSjUesat/50b0VlAW1NH//2aZcN56e0fifgIzeE8JtW68+EBdZqgAZF5dW0 7YFy2XcyeIgT76mwoYI2rmiNyTxsJJXXhY/hjcqd+vr8BHbiqdm+l0INUutJ/qWY3l zlrREjTpSWV2Q== From: Nathan Chancellor To: Greg Kroah-Hartman , Phillip Potter , Larry Finger Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor , "Fabio M . De Francesco" Subject: [PATCH] staging: r8188eu: Remove unnecessary ret variable in rtw_drv_init() Date: Fri, 13 Aug 2021 13:14:18 -0700 Message-Id: <20210813201418.4018631-1-nathan@kernel.org> X-Mailer: git-send-email 2.33.0.rc2 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ret is unnecessary as both error paths set the same error code so just return that directly. Suggested-by: Fabio M. De Francesco Signed-off-by: Nathan Chancellor --- drivers/staging/r8188eu/os_dep/usb_intf.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c index 667f41125a87..3e5f4b5eb0fc 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -705,22 +705,18 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device { struct adapter *if1 = NULL; struct dvobj_priv *dvobj; - int ret; /* step 0. */ process_spec_devid(pdid); /* Initialize dvobj_priv */ dvobj = usb_dvobj_init(pusb_intf); - if (!dvobj) { - ret = -ENODEV; + if (!dvobj) goto err; - } if1 = rtw_usb_if1_init(dvobj, pusb_intf); if (!if1) { DBG_88E("rtw_init_primarystruct adapter Failed!\n"); - ret = -ENODEV; goto free_dvobj; } @@ -734,7 +730,7 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device free_dvobj: usb_dvobj_deinit(pusb_intf); err: - return ret; + return -ENODEV; } /* base-commit: 0bd35146642bdc56f1b87d75f047b1c92bd2bd39 -- 2.33.0.rc2