Re: [Part2 Patch v4.2] crypto: ccp: Add Platform Security Processor (PSP) device support

From: P J P
Date: Wed Oct 04 2017 - 02:37:16 EST


+-- On Mon, 2 Oct 2017, Brijesh Singh wrote --+
| +int psp_dev_init(struct sp_device *sp)
| +{
| + struct device *dev = sp->dev;
| + struct psp_device *psp;
| + int ret;
| +
| + ret = -ENOMEM;
| + psp = psp_alloc_struct(sp);
| + if (!psp)
| + goto e_err;
| +
| + sp->psp_data = psp;
| ...
| +e_err:
| + sp->psp_data = NULL;

Needs to kfree(sp->psp_data) before setting to NULL.

--
- P J P
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F