wireless/wapi: correct check of return value

VELAPLATFO-2999

----------------------
 * Name: ioctl
...
 * Returned Value:
 *   >=0 on success (positive non-zero values are cmd-specific)
 *   -1 on failure with errno set properly:

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2022-06-24 19:03:12 +08:00 committed by Alan Carvalho de Assis
parent 19ba886ec2
commit ba030e5843

View File

@ -991,7 +991,7 @@ static int wapi_save_config_cmd(int sock, int argc, FAR char **argv)
&conf.alg,
psk,
&psk_len);
if (ret == 0)
if (ret >= 0)
{
conf.passphrase = psk;
conf.phraselen = psk_len;