From: Matthias Brugger Date: Wed, 11 Jan 2023 07:45:23 +0000 (+0800) Subject: soc: mediatek: mtk-svs: improve readability of platform_probe X-Git-Tag: v6.3-rc1~61^2~8^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=227fafd73b1c1f67114da6322fc32cb545b3a20b;p=thirdparty%2Flinux.git soc: mediatek: mtk-svs: improve readability of platform_probe 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. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Roger Lu Link: https://lore.kernel.org/r/20230111074528.29354-10-roger.lu@mediatek.com Signed-off-by: Matthias Brugger --- diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c index 95147d34f4ef6..937a4163bff1b 100644 --- a/drivers/soc/mediatek/mtk-svs.c +++ b/drivers/soc/mediatek/mtk-svs.c @@ -2360,10 +2360,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)