diff options
author | Maximilian Luz <luzmaximilian@gmail.com> | 2022-12-20 20:56:07 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-01-12 21:12:02 +0300 |
commit | c965daac370f08a9b71d573a71d13cda76f2a884 (patch) | |
tree | a4a753a86f55102f138c92b017b489d1be4598fc /drivers/platform/surface/aggregator | |
parent | ae0fa0a3126a86c801c3220fcd8eefe03aa39f3e (diff) | |
download | linux-c965daac370f08a9b71d573a71d13cda76f2a884.tar.xz |
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 <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20221220175608.1436273-1-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/surface/aggregator')
-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); |