From patchwork Sat Feb 22 13:54:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 11398111 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AE98D1580 for ; Sat, 22 Feb 2020 13:54:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97A2B20684 for ; Sat, 22 Feb 2020 13:54:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727297AbgBVNyY (ORCPT ); Sat, 22 Feb 2020 08:54:24 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:54221 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726839AbgBVNyY (ORCPT ); Sat, 22 Feb 2020 08:54:24 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1j5VEb-0001Ce-26; Sat, 22 Feb 2020 13:54:21 +0000 From: Colin King To: Bin Liu , Greg Kroah-Hartman , Matthias Brugger , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: musb: remove redundant assignment to variable ret Date: Sat, 22 Feb 2020 13:54:20 +0000 Message-Id: <20200222135420.135692-1-colin.king@canonical.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Colin Ian King Variable ret is being initialized with a value that is never read, it is assigned a new value later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/usb/musb/mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/mediatek.c b/drivers/usb/musb/mediatek.c index 6b88c2f5d970..6af3a346d4ce 100644 --- a/drivers/usb/musb/mediatek.c +++ b/drivers/usb/musb/mediatek.c @@ -444,7 +444,7 @@ static int mtk_musb_probe(struct platform_device *pdev) struct platform_device_info pinfo; struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - int ret = -ENOMEM; + int ret; glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL); if (!glue)