Skip to content

Commit 6325ce1

Browse files
qzedjwrdegoede
authored andcommitted
platform/surface: dtx: Add missing mutex_destroy() call in failure path
When we fail to open the device file due to DTX being shut down, the mutex is initialized but never destroyed. We are destroying it when releasing the file, so add the missing call in the failure path as well. Fixes: 1d60999 ("platform/surface: Add DTX driver") Signed-off-by: Maximilian Luz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent b430e1d commit 6325ce1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/platform/surface/surface_dtx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ static int surface_dtx_open(struct inode *inode, struct file *file)
427427
*/
428428
if (test_bit(SDTX_DEVICE_SHUTDOWN_BIT, &ddev->flags)) {
429429
up_write(&ddev->client_lock);
430+
mutex_destroy(&client->read_lock);
430431
sdtx_device_put(client->ddev);
431432
kfree(client);
432433
return -ENODEV;

0 commit comments

Comments
 (0)