diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index bde7d69b440d..e89563655030 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -194,7 +194,8 @@ static void rose_kill_by_device(struct net_device *dev) if (rose->device == dev) { rose_disconnect(s, ENETUNREACH, ROSE_OUT_OF_ORDER, 0); - rose->neighbour->use--; + if (rose->neighbour) + rose->neighbour->use--; rose->device = NULL; } }