Verify the notification relevance by checking if the device is a ethsw one.
Signed-off-by: Ioana Ciornei <[email protected]> --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index f179fd0..c5da40f 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -1063,6 +1063,9 @@ static int port_switchdev_event(struct notifier_block *unused, struct ethsw_switchdev_event_work *switchdev_work; struct switchdev_notifier_fdb_info *fdb_info = ptr; + if (!ethsw_port_dev_check(dev)) + return NOTIFY_DONE; + switchdev_work = kzalloc(sizeof(*switchdev_work), GFP_ATOMIC); if (!switchdev_work) return NOTIFY_BAD; -- 1.9.1

