From a4d98fac51f321bc42bc64dd8584f67f751d69f6 Mon Sep 17 00:00:00 2001 From: Andrey Shvetsov Date: Fri, 12 May 2017 12:59:52 +0200 Subject: [PATCH] staging: most: check availability of the callback request_netinfo Since not all HDMs implement the callback request_netinfo, this patch adds checking of its availability. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman --- drivers/staging/most/aim-network/networking.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/most/aim-network/networking.c b/drivers/staging/most/aim-network/networking.c index 5822902ecb4a..03ddbd2459d6 100644 --- a/drivers/staging/most/aim-network/networking.c +++ b/drivers/staging/most/aim-network/networking.c @@ -203,7 +203,8 @@ static int most_nd_open(struct net_device *dev) else netif_dormant_on(dev); netif_wake_queue(dev); - nd->iface->request_netinfo(nd->iface, nd->tx.ch_id); + if (nd->iface->request_netinfo) + nd->iface->request_netinfo(nd->iface, nd->tx.ch_id); return 0; }