[PATCH linux dev-4.10 v3 16/31] drivers: fsi: occ: Fix errant kfree calls

Andrew Jeffery andrew at aj.id.au
Fri Oct 6 09:58:10 AEDT 2017


On Thu, 2017-10-05 at 14:24 -0500, Eddie James wrote:
> From: "Edward A. James" <eajames at us.ibm.com>
> 
> Left over from when xfr was an independant structure. Remove these
calls
> as xfr is a part of the client struct.
> 
> Signed-off-by: Edward A. James <eajames at us.ibm.com>

Reviewed-by: Andrew Jeffery <andrew at aj.id.au>

> ---
>  drivers/fsi/occ.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/fsi/occ.c b/drivers/fsi/occ.c
> index 2d7df8a..cd60c5a 100644
> --- a/drivers/fsi/occ.c
> +++ b/drivers/fsi/occ.c
> @@ -289,7 +289,6 @@ static ssize_t occ_write_common(struct occ_client
*client,
>  
>  	if (ubuf) {
>  		if (copy_from_user(&xfr->buf[1], ubuf, len)) {
> -			kfree(xfr);
>  			rc = -EFAULT;
>  			goto done;
>  		}
> @@ -298,7 +297,6 @@ static ssize_t occ_write_common(struct occ_client
*client,
>  
>  	data_length = (xfr->buf[2] << 8) + xfr->buf[3];
>  	if (data_length > OCC_CMD_DATA_BYTES) {
> -		kfree(xfr);
>  		rc = -EINVAL;
>  		goto done;
>  	}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20171006/9a5a73cf/attachment.sig>


More information about the openbmc mailing list