Commit f0107b86 authored by Rob Herring's avatar Rob Herring Committed by Paolo Abeni

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: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20231006214421.339445-1-robh@kernel.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 000677f9
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#ifdef CONFIG_SBUS #ifdef CONFIG_SBUS
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_device.h> #include <linux/platform_device.h>
#include <asm/idprom.h> #include <asm/idprom.h>
#include <asm/openprom.h> #include <asm/openprom.h>
#include <asm/oplib.h> #include <asm/oplib.h>
...@@ -2520,18 +2520,12 @@ static int fore200e_init(struct fore200e *fore200e, struct device *parent) ...@@ -2520,18 +2520,12 @@ static int fore200e_init(struct fore200e *fore200e, struct device *parent)
} }
#ifdef CONFIG_SBUS #ifdef CONFIG_SBUS
static const struct of_device_id fore200e_sba_match[];
static int fore200e_sba_probe(struct platform_device *op) static int fore200e_sba_probe(struct platform_device *op)
{ {
const struct of_device_id *match;
struct fore200e *fore200e; struct fore200e *fore200e;
static int index = 0; static int index = 0;
int err; int err;
match = of_match_device(fore200e_sba_match, &op->dev);
if (!match)
return -EINVAL;
fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL); fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL);
if (!fore200e) if (!fore200e)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment