Re: [PATCH v3] cachefiles: fix error return code in cachefiles_ondemand_copen()

From: David Howells
Date: Wed Aug 24 2022 - 06:19:40 EST


/* fail OPEN request if copen format is invalid */
ret = kstrtol(psize, 0, &size);
if (ret) {
req->error = ret;
goto out;
}

/* fail OPEN request if daemon reports an error */
if (size < 0) {
if (!IS_ERR_VALUE(size))
ret = size = -EINVAL;
req->error = size;
goto out;
}

Should ret get set to the error in size?

David