From patchwork Tue Jan 3 11:29:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Lu X-Patchwork-Id: 638983 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBA97C54EBE for ; Tue, 3 Jan 2023 11:30:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237468AbjACLaI (ORCPT ); Tue, 3 Jan 2023 06:30:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237459AbjACL3p (ORCPT ); Tue, 3 Jan 2023 06:29:45 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C3EFDFF4; Tue, 3 Jan 2023 03:29:32 -0800 (PST) X-UUID: 529f34589288435bbd11259abc8c49e2-20230103 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=M12pbSd33pUBNXrtfdOe21AnegQXpEhlPgH8BnAB0eVQudERBUdZJZJZQdJvZQP3vhZX/sxs+ntoovZGlnDlERUwG+papn/8Ra1ARu1i2GjZtxdVcpLdluQilXZjarRLlf7lFvbf2iv2vpwF7tDee0Cs8zdwTzlmXNayUt3YmVM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.16, REQID:ccfb4043-6743-4a94-906d-f3a8e5bd36f0, IP:0, U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:90 X-CID-INFO: VERSION:1.1.16, REQID:ccfb4043-6743-4a94-906d-f3a8e5bd36f0, IP:0, URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:90 X-CID-META: VersionHash:09771b1, CLOUDID:3d9e1b8b-8530-4eff-9f77-222cf6e2895b, B ulkID:230103192928V0CHKV59,BulkQuantity:1,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:11|1,File:nil,Bulk:40,QS:nil,BEC:nil,COL:0, OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: 529f34589288435bbd11259abc8c49e2-20230103 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1785882082; Tue, 03 Jan 2023 19:29:28 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 3 Jan 2023 19:29:26 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Tue, 3 Jan 2023 19:29:26 +0800 From: Roger Lu To: Matthias Brugger , Enric Balletbo Serra , Kevin Hilman , Nicolas Boichat CC: Fan Chen , Roger Lu , Jia-wei Chang , , , , , , Subject: [PATCH v3 04/14] soc: mediatek: mtk-svs: improve readability of platform_probe Date: Tue, 3 Jan 2023 19:29:15 +0800 Message-ID: <20230103112925.16554-5-roger.lu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230103112925.16554-1-roger.lu@mediatek.com> References: <20230103112925.16554-1-roger.lu@mediatek.com> MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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)