summaryrefslogtreecommitdiffstats
path: root/net/caif/caif_dev.c
diff options
context:
space:
mode:
authorAndré Carvalho de Matos <andre.carvalho.matos@stericsson.com>2010-11-01 12:52:47 +0100
committerDavid S. Miller <davem@davemloft.net>2010-11-04 02:50:03 +0100
commitf2527ec436fd675f08a8e7434f6e940688cb96d0 (patch)
treef3c723c652b58cd4862d635e598a4ad88eedec64 /net/caif/caif_dev.c
parentsmsc911x: Set Ethernet EEPROM size to supported device's size (diff)
downloadlinux-f2527ec436fd675f08a8e7434f6e940688cb96d0.tar.xz
linux-f2527ec436fd675f08a8e7434f6e940688cb96d0.zip
caif: Bugfix for socket priority, bindtodev and dbg channel.
Changes: o Bugfix: SO_PRIORITY for SOL_SOCKET could not be handled in caif's setsockopt, using the struct sock attribute priority instead. o Bugfix: SO_BINDTODEVICE for SOL_SOCKET could not be handled in caif's setsockopt, using the struct sock attribute ifindex instead. o Wrong assert statement for RFM layer segmentation. o CAIF Debug channels was not working over SPI, caif_payload_info containing padding info must be initialized. o Check on pointer before dereferencing when unregister dev in caif_dev.c Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif/caif_dev.c')
-rw-r--r--net/caif/caif_dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index b99369a055d1..a42a408306e4 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -307,6 +307,8 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
case NETDEV_UNREGISTER:
caifd = caif_get(dev);
+ if (caifd == NULL)
+ break;
netdev_info(dev, "unregister\n");
atomic_set(&caifd->state, what);
caif_device_destroy(dev);