staging: most: check availability of the callback request_netinfo

Christian Gromm christian.gromm at microchip.com
Wed May 10 15:33:08 UTC 2017


From: Andrey Shvetsov <andrey.shvetsov at k2l.de>

Since not all HDMs implement the callback request_netinfo, this patch
adds checking of its availability.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov at k2l.de>
Signed-off-by: Christian Gromm <christian.gromm at microchip.com>
---
 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;
 }
 
-- 
2.11.0



More information about the devel mailing list