Message ID | 20211127140836.GB24002@kili (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DFA7FC433F5 for <linux-mediatek@archiver.kernel.org>; Sat, 27 Nov 2021 14:09:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc: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=rfTKAmQ9pEzyLLJ0PUt6x0Q2F8NUi7bR6jqtc347ioI=; b=EGOAdOf/BIWGWn tyzUX28LtOynqsypNG2F90o7u4qfq4jTBMqrTiZp3f/NyumUSpqZ9r4oYWjNFevqW9SaQInJCudgF IIOoPynpfvj8UogrYhVSg3LdAvCEMIpV4VaJX4GkIaXkJ1DrHWc4OAOhDw+ACocdfwhYwZJGhXMb3 qSWd/842daKTLxgyWZfTWaSN7XqtlSWQ4UbE6qZKudnX++ynoJBfM+f6YUw1TX+PCuo51dvRQILtZ lLjVmDUJRsUkjbPvZW7nVddNYNnTJSzfNE84Thxeyd91lA0JVqGopZYGyu0yTzDcsIjU6Srm1dl28 yKm7t9+A8LPrkk0Bo0/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqyO8-00DloX-GW; Sat, 27 Nov 2021 14:09:12 +0000 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqyO6-00Dlnt-Hd for linux-mediatek@lists.infradead.org; Sat, 27 Nov 2021 14:09:11 +0000 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1ARCs0v0000960; Sat, 27 Nov 2021 14:08:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : mime-version; s=corp-2021-07-09; bh=WTZ/tiBoUwxaMKzvQOaNuDeG9RMDaZr3VJaqEc35fqo=; b=G7sEnzI8MpDEN/6liHbu3OTQloP48DRKoabHeQ+tIjSe6qBfUUjLKOizMH6whElky6Ud 394lWmt1iUU/JWeolx31xnE3SwlUlhWQZLca4/9nV9CotBDKUegueUK7WtfnFxHpSiG1 DtDpgNse8mryHfkuBTWZPVwWEOskeOSwbgAgrOFD8ceWaWZySrYecq3qN7x3l+RThsRr nnIUIXHMslaaAjVNJGlCPZrXgaqjMt/HU9mCY+EDP42tGAxtBMBMygKbhLXBn1XFc6U9 cQG/ObuwEpGTapXahAMOs7GaGPU5Wy6gPZAZ7uOZEC7rggJB1iGyumm757SOqIZNMMZ2 kA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3ckb9gh2fa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 27 Nov 2021 14:08:57 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1ARE5V1N105145; Sat, 27 Nov 2021 14:08:56 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2049.outbound.protection.outlook.com [104.47.66.49]) by aserp3020.oracle.com with ESMTP id 3ckcg16usk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 27 Nov 2021 14:08:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dZvn5Z4e1Wo3Jyw3nBYzaLiYZyd+zam0y4Y4DXx+FpHA8al/XE+jViNI3nUSHsCxmyxjF5DZxxcgm391gW/lUcGDV+2kiYEVcDizvZeFUlkpWig6acf8YlLSmbnevkOI8TxuxGCTe3z90EMxYZcq4k+7oRNUkn/RjwqbYIIIn442VCHHDY9sWs7zqh+cRNFKXvexZdimiVnIb/XMpfmTjnZ0oakkVv0wKF7kIkE+RHIpuzRr/hhggBpptgf65VZ3V0l3OiwjvmICTNRuA5larvYZmFnIk4nTDtm52ONpwhSumXno+ARf7ztaf/luLooPo9S16571zARw0j4IBGHDIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WTZ/tiBoUwxaMKzvQOaNuDeG9RMDaZr3VJaqEc35fqo=; b=hFQhbdH/ddbdmN1orwzFUkJ3nW/kN5w+Za1QQ+kxh6qtYDLH8Qbxv9HnvGQ6dA1oJd/SDFqaMQBqOiLXcEdPdr81ZHBNqok851tb4Hwnng3KsUpIgHxX60shB+CI3OpAZS0Ho9+EXNdS/YU9NS9ACcYVbE5v3qixqxN9LPU3jFL+RNCjsLfzv5Uix2/GJu4o5T1VV2EKeoUeuyXpAKtWTpEy02v2Hfh46AlsOKlw5Oc5cJchdEiBpK9K17G7OCRgT64VnZKu6DkPRHa1ddkxDKcFH2m1gwMUoLhZMx8dqFgyeDqNWEsHUhFbhXWuymWd58d6ZUKITT94FZNVohhAdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WTZ/tiBoUwxaMKzvQOaNuDeG9RMDaZr3VJaqEc35fqo=; b=rJ0LMUp0MzbZnE3GKHKZJRTTfXmh1//BRBHKcHmLxw0LYHncjJsMVHuWuyWTqPNpYqccGinkU7+oH9GdSpKzuzuZFe88l4eh+DYtHsmb3omiKJXY/1b4REyqj87XeL1dtcWx5i+SaVprbaiw0REwTFW9hWu5/KZOZmxZA3/N0GY= Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by MWHPR10MB1824.namprd10.prod.outlook.com (2603:10b6:300:10a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Sat, 27 Nov 2021 14:08:54 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::7194:c377:36cc:d9f0]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::7194:c377:36cc:d9f0%6]) with mapi id 15.20.4734.023; Sat, 27 Nov 2021 14:08:54 +0000 Date: Sat, 27 Nov 2021 17:08:36 +0300 From: Dan Carpenter <dan.carpenter@oracle.com> To: Sean Wang <sean.wang@kernel.org>, Zhiyong Tao <zhiyong.tao@mediatek.com> Cc: Linus Walleij <linus.walleij@linaro.org>, Matthias Brugger <matthias.bgg@gmail.com>, Chen-Yu Tsai <wenst@chromium.org>, linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] pinctrl: mediatek: add a check for error in mtk_pinconf_bias_get_rsel() Message-ID: <20211127140836.GB24002@kili> Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: ZR0P278CA0075.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::8) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 Received: from kili (102.222.70.114) by ZR0P278CA0075.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.20 via Frontend Transport; Sat, 27 Nov 2021 14:08:48 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8e3afc8-8f68-4d38-bafd-08d9b1af721f X-MS-TrafficTypeDiagnostic: MWHPR10MB1824: X-Microsoft-Antispam-PRVS: <MWHPR10MB182457D4BB785770EB7F18B28E649@MWHPR10MB1824.namprd10.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LwAEPEdMTcX8o7v3Fh33YQvUSC4UpXVk+m2JAQCFb38FZ0dSG3IbxWCh84HjnNxRNK6Zr1VGUBmhTLz4tDrR1UBUbNurimco2HE1+jQzbl0jYpyCcYuo7Ns1kLkGDEQrXYWr22pJbdyY355glYZGDaMHV38Wnn6xqAdwSj1nJqmlCfXOe5JkH8oTMNjOmjspOc9vN3Db+FnnXOXeC6+T71o45HkiUsTBsZbNS2fB7HNE3KOkaLljG29GdzkTwiT7xyqp2oxYUbEb50khywkhF/C8Z3tdbFWyxKuBlC39enxyFK8T/pAOHSE+9AqcZJAraJjapLm0gVdf1vko+Amm17SF2OY8YLEF/dPx2freee29YNcN33ncSooCU4aKl4UgCW0EQf1cyj0oEVzavcVV60qAQtfycMB8+u8i5ctH8crjLbYBCuRiEgARYxl9BStmZMPUiQ8+eEEulG5zb1o8d6Tdp1FDInFKmwYquOP0NVBVRkmtcvM8VxP3NwJgCE5jU4PkS1FtafGVsi8kUyvLdsbZh7TbmXhiG2wvU17SlO9DQIwmGlH4mIco9JX378ajnS8rovtCDAMEUvLxJqIhi4eVNmY6ivO0Hid+Y+oxtIl8hT71tvn5/I2YRDJGcy0J8zLSG9pyirlYIHjcg7vw2nW3mfWDWagGoOMP+6fqLg2XJeOrPb1MsPOwQWHTXhBKT/Ta6/4t8CZGEGbRv1m5Cw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2365.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8936002)(52116002)(38350700002)(38100700002)(33716001)(86362001)(2906002)(186003)(6496006)(54906003)(5660300002)(33656002)(508600001)(44832011)(9686003)(8676002)(9576002)(55016003)(110136005)(4744005)(66946007)(26005)(1076003)(4326008)(6666004)(66556008)(83380400001)(316002)(66476007)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1Ior8Kxy2aSWa0m47N6U2uzjQICzeP//9rIeJG0Yf1oL5oknh2eoCH0M1WZ6DviT9bsJl23qMAly7lcCmPh3KPZyP06eGaHlKp71eZFheXvSSiditYavFQ98W3x0Zlc7Y0W6sSXjsx1st+4o4hlV3c/CVhCZceV4VVTqD45+c9wrTREJM1Ql+KkC6GyE9o3HvHaC0w8dM1/clLXaiOzznbNZj5yX8SOqm5TTSx3nd7gLZqHJdtaxkYtvhRa/6rblWWbU4nykJIIlxSHWrvj14WtIeWe5SQZ6HypK9Oa0mec8acX47Yi4JMHcLcAS3kdlrTVlgJcLqjEHe5yiQimXj56+oByHFO5SLd3f+tnyOIWJdOKqxztxE6dt5KiaRNOJu8whZ4MOAxFGfvRwjKPl9OfTzaQ579UTADCMzhceS5COuHQG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daq2GBYMyQ+dfVFyoffwrPsWFyYS4t7iqAN/cOReaoPbnVQSpzWmw17zgTWFUX8+LEdFLRmSSzwZVLNBDJvS3mELgqH7X+vab+nXA9LWr7XsptQfENMQusLcEcnfBdx8JOsUJWuqwXVAi1VYSJ/o19/bNW6uZXWTKQ6djcfItPJ+HbjujQTv5fiDTzs2pYWxEnmzzPvgo1lOzbtYBogpIAw= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8e3afc8-8f68-4d38-bafd-08d9b1af721f X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2021 14:08:54.5788 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: s/jPj6FsTR5sgsJjU/DC0QcIGv6LQ+QrOmVlHOT8Sd4iMsRUcupGWWcU/SPqg3gdILXMKd6JMhPcF5mpWNIhZpMUuesKOHTPauCpd6FQFvM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1824 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10180 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111270084 X-Proofpoint-ORIG-GUID: ktOZGaLeDFduYFtGaTGuvKY-t3G4dVV0 X-Proofpoint-GUID: ktOZGaLeDFduYFtGaTGuvKY-t3G4dVV0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211127_060910_624977_B7C0E981 X-CRM114-Status: GOOD ( 15.29 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-mediatek.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mediatek/> List-Post: <mailto:linux-mediatek@lists.infradead.org> List-Help: <mailto:linux-mediatek-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" <linux-mediatek-bounces@lists.infradead.org> Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org |
Series |
pinctrl: mediatek: add a check for error in mtk_pinconf_bias_get_rsel()
|
expand
|
On Sat, Nov 27, 2021 at 3:09 PM Dan Carpenter <dan.carpenter@oracle.com> wrote: > All the other mtk_hw_get_value() calls have a check for "if (err)" so > we can add one here as well. This silences a Smatch warning: > > drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:819 mtk_pinconf_bias_get_rsel() > error: uninitialized symbol 'pd'. > > Fixes: fb34a9ae383a ("pinctrl: mediatek: support rsel feature") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Patch applied. Yours, Linus Walleij
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c index 53779822348d..e1ae3beb9f72 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c @@ -815,6 +815,8 @@ static int mtk_pinconf_bias_get_rsel(struct mtk_pinctrl *hw, goto out; err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_PD, &pd); + if (err) + goto out; if (pu == 0 && pd == 0) { *pullup = 0;
All the other mtk_hw_get_value() calls have a check for "if (err)" so we can add one here as well. This silences a Smatch warning: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:819 mtk_pinconf_bias_get_rsel() error: uninitialized symbol 'pd'. Fixes: fb34a9ae383a ("pinctrl: mediatek: support rsel feature") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 2 ++ 1 file changed, 2 insertions(+)