aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/most/aim-network/networking.c
diff options
context:
space:
mode:
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>2017-05-12 12:59:52 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-15 11:59:09 +0200
commita4d98fac51f321bc42bc64dd8584f67f751d69f6 (patch)
treead11b646573a5a3cefb7e916cbad68231596898e /drivers/staging/most/aim-network/networking.c
parentstaging: most: net: add carrier information (diff)
downloadlinux-dev-a4d98fac51f321bc42bc64dd8584f67f751d69f6.tar.xz
linux-dev-a4d98fac51f321bc42bc64dd8584f67f751d69f6.zip
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>
Diffstat (limited to '')
-rw-r--r--drivers/staging/most/aim-network/networking.c3
1 files changed, 2 insertions, 1 deletions
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;
}