From patchwork Thu Mar 28 14:31:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10875061 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB6711390 for ; Thu, 28 Mar 2019 14:32:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF98828F43 for ; Thu, 28 Mar 2019 14:32:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A349428EA1; Thu, 28 Mar 2019 14:32:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A382128B76 for ; Thu, 28 Mar 2019 14:32:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ff/20+q+3l7yx6D2ajfzL6xdWf73P5982fMIpw+1G2A=; b=BoGOiDbXSG01hY kGHSmJI3JdfAJhAuPAHyS6Bpip97z9si027fzyLD0cdVxBfjD9gDz6svGuLc7qKctGs0GCRv4Q1Fo 4Z5QjJX/BNXXJ/tU6ar4VQ9rvYx7HN/5b7DU/wwup+sZGJ0WEEF2o2ai48vI95etw1tFOKYx27KYj BAYxlATF5z9z9zthF5+L60nexpqYhQQ4JstPdjvsk1OBs/scm3XE9xepsCl03qD3y5tNjz11XnBAu 4m90kQVHEwPIgV1BlN8WV6azlxkT3oIqmvKZyqcmvGLwdyx65CpHd+R8lj5+JKxHO7UuZyYYR1jXj 5cR4RKj1N2oRolw4Zk4w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9W4W-0000OC-Pe; Thu, 28 Mar 2019 14:32:00 +0000 Received: from userp2120.oracle.com ([156.151.31.85]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9W4U-0000NW-94 for linux-mediatek@lists.infradead.org; Thu, 28 Mar 2019 14:31:59 +0000 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2SEODNk056285; Thu, 28 Mar 2019 14:31:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=cGkafd3YIkDZtIcr0PtEsN/QUQnfOav9DOVAZco2/Jg=; b=BcPz2bjJMly03ijdtvnAE2OpEWPULvhfo1dGzwF/Jdqm6mcqM+a0i5kvGpudgotckBuo 7XhaparCF7kvkJy6HX737Ev4RhMgqVRHxhmGBg383IIf6Ul2BZ+XJhXSyh6gOqDQ/HKn 0O7s4+nOHMB4dXAYnAaVn68opflh1wGOba5NcAIgHCSd4EosT4tHTNAoQfQ96DLZEAy/ VzQZ0J5Z30KQOCA3qd7AwdZM0zRpIQUdqpZfxRgF4zfwtpz01rtP7IYJLuEWSFseyTah o8y9L45SFvjq+3PUmaKYqrrovz6hSBh2BVwBSvJ2pcjBPsEJU9AykYAC1qpMCe2OgIWp LQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2re6djq0rk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Mar 2019 14:31:50 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x2SEVmuh021630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Mar 2019 14:31:49 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x2SEVhxH017641; Thu, 28 Mar 2019 14:31:44 GMT Received: from kadam (/41.202.241.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 28 Mar 2019 07:31:43 -0700 Date: Thu, 28 Mar 2019 17:31:30 +0300 From: Dan Carpenter To: CK Hu , Jie Qiu Subject: [PATCH] drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata() Message-ID: <20190328143130.GO32590@kadam> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9208 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903280098 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190328_073158_414191_8E3A20C6 X-CRM114-Status: GOOD ( 15.24 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Philipp Zabel , David Airlie , kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, Daniel Vetter , Matthias Brugger Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We don't want to overwrite "ret", it already holds the correct error code. The "regmap" variable might be a valid pointer as this point. Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index 915cc84621ae..543a25e5765e 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -1480,7 +1480,6 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, if (IS_ERR(regmap)) ret = PTR_ERR(regmap); if (ret) { - ret = PTR_ERR(regmap); dev_err(dev, "Failed to get system configuration registers: %d\n", ret);