Browse Source

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 <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrey Shvetsov 8 years ago
parent
commit
a4d98fac51
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/staging/most/aim-network/networking.c

+ 2 - 1
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;
 }