diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c index fd1d0c34aa..6364c9f201 100644 --- a/drivers/wireless/gs2200m.c +++ b/drivers/wireless/gs2200m.c @@ -2383,6 +2383,7 @@ static int gs2200m_ioctl_send(FAR struct gs2200m_dev_s *dev, { wlinfo("+++ already closed \n"); type = TYPE_DISCONNECT; + ret = -ENOTCONN; goto errout; } @@ -2392,7 +2393,7 @@ static int gs2200m_ioctl_send(FAR struct gs2200m_dev_s *dev, errout: - if (type != TYPE_OK) + if (type != TYPE_OK && type != TYPE_DISCONNECT) { ret = -EINVAL; }