From: Rob Herring Date: Fri, 6 Oct 2023 21:44:21 +0000 (-0500) Subject: atm: fore200e: Drop unnecessary of_match_device() X-Git-Tag: io_uring-6.7-2023-11-10~40^2~200 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f0107b864f004bc6fa19bf6d5074b4a366f3e16a;p=linux-2.6-block.git atm: fore200e: Drop unnecessary of_match_device() It is not necessary to call of_match_device() in probe. If we made it to probe, then we've already successfully matched. Signed-off-by: Rob Herring Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20231006214421.339445-1-robh@kernel.org Signed-off-by: Paolo Abeni --- diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index fb2be3574c26..50d8ce20ae5b 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c @@ -36,7 +36,7 @@ #ifdef CONFIG_SBUS #include -#include +#include #include #include #include @@ -2520,18 +2520,12 @@ static int fore200e_init(struct fore200e *fore200e, struct device *parent) } #ifdef CONFIG_SBUS -static const struct of_device_id fore200e_sba_match[]; static int fore200e_sba_probe(struct platform_device *op) { - const struct of_device_id *match; struct fore200e *fore200e; static int index = 0; int err; - match = of_match_device(fore200e_sba_match, &op->dev); - if (!match) - return -EINVAL; - fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL); if (!fore200e) return -ENOMEM;