From patchwork Tue Dec 27 12:09:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Lu X-Patchwork-Id: 13082266 Return-Path: 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 D66B9C4332F for ; Tue, 27 Dec 2022 12:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:CC:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6Sq/sAfTpgkWc7ZeE72qhux4vsS2w/D6it6j/hKEQAs=; b=lBae2PjxVMGeOE48UrMahV+FDR PvHQVnVU1RLWjB7io8cEUZ5XuBuTKuZdZK73bOJ5nokp3Mvpp3I7nNZWvwPcnsFxhpSFFITuBGM3w 1POwFPxQJ1KfGG466jsklAkJN5AMTtCq/vKo9KDx/pBMbVR9aM1fDc68IMjmCK6l3u0QcH3naWLvZ scUKOZ4kHB54eyXM05p24e7WFJy+2uUdng72D3jFiFNLLgS1d/QoPbe3gbIU/tpXQcR6d7SYqSkQB XQHjjYXzl7JvhwTEgyWZ17YtOSxqrnYWkVogN22XtIDZZZo0nesFHYNY3AZts0MD1cXRVsp33xdNF FTEZ58mA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pA96H-00CsgA-Bm; Tue, 27 Dec 2022 12:30:33 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pA96F-00Csf4-Tt; Tue, 27 Dec 2022 12:30:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=6Sq/sAfTpgkWc7ZeE72qhux4vsS2w/D6it6j/hKEQAs=; b=p3L/pDQJSrKIAHu2AoOZ7M1wsy JZ6skT1ICKw0fjoCxlwnGcklD7Lnsw5z/u27rQ7+ZlgOPk3WTgClK9TwdTMvPXseBpe/rvLPfeKht XnTg/4HQXKVZs0JlBhjqP3TBUCosaC8BsyExNKqqcjhCMS2NRuOi96A9yLzMDldEpFX9pjGX6h/78 /myhPEh6r8DC1fYZ1eg9deZyq24+wcfUVSn+Ah8CPZZ6o7t0NqNdDQkuGiChlrZqAjBAuo9YTEGaQ AUQKenmuVoOxdMGa+BDn7HkyiZDNdu4GRI9HB0uO2z4Cxt5ZXNwaa5vT7yXwAoYp35k1VDbm4qdY1 UBypNtng==; Received: from mailgw02.mediatek.com ([216.200.240.185]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pA968-00Fdoo-2u; Tue, 27 Dec 2022 12:30:27 +0000 X-UUID: d15c7d543531467db6b3fef88bf2c994-20221227 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=6Sq/sAfTpgkWc7ZeE72qhux4vsS2w/D6it6j/hKEQAs=; b=kTj/pecpWA7ASJRjMQ301kn1hUYkd1btFe49v0vVHhfqBhyEMoeSOzxTzbpVCCM1Go8Ql9lDdrowBKNO0zFzFGYAvpaG+s8rHtZDllZouXmobws03+hya8dzgBp891ygsbFZPrgUIRTxwzgEpmh09b3I3FDdNrYMKNWXioYlJS4=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14,REQID:36d4bcab-08b8-4495-b50f-d1d418a6d2a4,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:dcaaed0,CLOUDID:fed3898a-8530-4eff-9f77-222cf6e2895b,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: d15c7d543531467db6b3fef88bf2c994-20221227 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1525224716; Tue, 27 Dec 2022 05:30:21 -0700 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Tue, 27 Dec 2022 20:09:17 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Tue, 27 Dec 2022 20:09:17 +0800 From: Roger Lu To: Matthias Brugger , Enric Balletbo Serra , Kevin Hilman , Nicolas Boichat CC: Fan Chen , Roger Lu , Jia-wei Chang , , , , , , Subject: [PATCH v2 04/13] soc: mediatek: mtk-svs: improve readability of platform_probe Date: Tue, 27 Dec 2022 20:09:05 +0800 Message-ID: <20221227120914.11346-5-roger.lu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20221227120914.11346-1-roger.lu@mediatek.com> References: <20221227120914.11346-1-roger.lu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221227_123025_620083_C0653085 X-CRM114-Status: GOOD ( 10.20 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Matthias Brugger If a compatible misses a match data entry, then something is wrong in the development phase, we don't need to check for that at runtime. Signed-off-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Roger Lu --- drivers/soc/mediatek/mtk-svs.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c index 5abf94aafbac..7fea1a5bb842 100644 --- a/drivers/soc/mediatek/mtk-svs.c +++ b/drivers/soc/mediatek/mtk-svs.c @@ -2332,10 +2332,6 @@ static struct svs_platform *svs_platform_probe(struct platform_device *pdev) int ret; svsp_data = of_device_get_match_data(&pdev->dev); - if (!svsp_data) { - dev_err(&pdev->dev, "no svs platform data?\n"); - return ERR_PTR(-EPERM); - } svsp = devm_kzalloc(&pdev->dev, sizeof(*svsp), GFP_KERNEL); if (!svsp)