Hi Ravi, On Fri, Nov 08, 2013, Ravi kumar Veeramally wrote: > + fd = g_io_channel_unix_get_fd(dev->ctrl_io); > + > + if (write(fd, &hdr, sizeof(hdr)) < 0) { > + error("error while virtual unplug command"); > + return HAL_STATUS_FAILED; > + } > + > + /* Wait either channels to HUP */ > + if (dev->intr_io) > + g_io_channel_shutdown(dev->intr_io, TRUE, NULL); > + > + if (dev->ctrl_io) > + g_io_channel_shutdown(dev->ctrl_io, TRUE, NULL); This looks a bit suspicious. First you try to get the fd from ctrl_io without checking if it's NULL and then later you have an explicit check for whether it is NULL or not. Is there some check missing earlier in the function? Johan -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html