diff options
| author | Maximilian Luz <[email protected]> | 2022-12-20 17:56:07 +0000 |
|---|---|---|
| committer | Hans de Goede <[email protected]> | 2023-01-12 18:12:02 +0000 |
| commit | c965daac370f08a9b71d573a71d13cda76f2a884 (patch) | |
| tree | a4a753a86f55102f138c92b017b489d1be4598fc /drivers/platform/surface/aggregator/controller.c | |
| parent | platform/surface: aggregator: Ignore command messages not intended for us (diff) | |
| download | kernel-c965daac370f08a9b71d573a71d13cda76f2a884.tar.gz kernel-c965daac370f08a9b71d573a71d13cda76f2a884.zip | |
platform/surface: aggregator: Add missing call to ssam_request_sync_free()
Although rare, ssam_request_sync_init() can fail. In that case, the
request should be freed via ssam_request_sync_free(). Currently it is
leaked instead. Fix this.
Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem")
Signed-off-by: Maximilian Luz <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/controller.c')
| -rw-r--r-- | drivers/platform/surface/aggregator/controller.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c index 43e765199137..c6537a1b3a2e 100644 --- a/drivers/platform/surface/aggregator/controller.c +++ b/drivers/platform/surface/aggregator/controller.c @@ -1700,8 +1700,10 @@ int ssam_request_sync(struct ssam_controller *ctrl, return status; status = ssam_request_sync_init(rqst, spec->flags); - if (status) + if (status) { + ssam_request_sync_free(rqst); return status; + } ssam_request_sync_set_resp(rqst, rsp); |
