From patchwork Sun Jan 24 14:38:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junlin Yang X-Patchwork-Id: 370439 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 E53A3C433DB for ; Sun, 24 Jan 2021 15:28:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B258D22E03 for ; Sun, 24 Jan 2021 15:28:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726388AbhAXP2i (ORCPT ); Sun, 24 Jan 2021 10:28:38 -0500 Received: from m12-11.163.com ([220.181.12.11]:43618 "EHLO m12-11.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbhAXP2e (ORCPT ); Sun, 24 Jan 2021 10:28:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=qiH8y DnOdrgk+by1MixH/4jWCILOKNLS/w4DP5LFk68=; b=ZYORYY3qjst5k2J4JkRYb Wk8qcb1vkYOHB3i0ZIaxZ+/DGjypozlNKk8OVbmTPOp9gOX9FuIehNmrYGW26EtT jG2J9kzp6KPIu+eKgXK7LgKY4+q6/7M+caft72fdjafhObBoWqmvJhHrKOfb7XJh C9cFPWrzBeL7A3n5iQOxdQ= Received: from yangjunlin.ccdomain.com (unknown [119.137.52.0]) by smtp7 (Coremail) with SMTP id C8CowADn92uAhg1gG8CWKQ--.24963S2; Sun, 24 Jan 2021 22:38:57 +0800 (CST) From: angkery To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Junlin Yang Subject: [PATCH v3 1/2] usb: typec: tcpci_maxim: remove redundant assignment Date: Sun, 24 Jan 2021 22:38:53 +0800 Message-Id: <20210124143853.1630-1-angkery@163.com> X-Mailer: git-send-email 2.24.0.windows.2 MIME-Version: 1.0 X-CM-TRANSID: C8CowADn92uAhg1gG8CWKQ--.24963S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrZF1DtFy7GF4ftry5GryDZFb_yoWfKrXEkr 1xWFs2vr409F9Yqr1jyayfZ34FyrWvgFsa9F4vqrn0ywn8Cr9Fgr90yr15ArZrGF4UtryD Wrn8Wr4SkFZ8CjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUexMa5UUUUU== X-Originating-IP: [119.137.52.0] X-CM-SenderInfo: 5dqjyvlu16il2tof0z/xtbBCwIkI13l+ThXfAAAsc Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Junlin Yang PTR_ERR(chip->tcpci) has been used as a return value, it is not necessary to assign it to ret, so remove it. Signed-off-by: Junlin Yang --- v3:remove the newline modification. drivers/usb/typec/tcpm/tcpci_maxim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c index 3192663..7f54f51a 100644 --- a/drivers/usb/typec/tcpm/tcpci_maxim.c +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c @@ -461,7 +461,6 @@ static int max_tcpci_probe(struct i2c_client *client, const struct i2c_device_id chip->tcpci = tcpci_register_port(chip->dev, &chip->data); if (IS_ERR(chip->tcpci)) { dev_err(&client->dev, "TCPCI port registration failed"); - ret = PTR_ERR(chip->tcpci); return PTR_ERR(chip->tcpci); } chip->port = tcpci_get_tcpm_port(chip->tcpci);