Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 1d609992832e ("platform/surface: Add DTX driver")
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20210604132540.533036-1-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Maximilian Luz and committed by
Hans de Goede
a32348b7 ae8ee4c1

+1
+1
drivers/platform/surface/surface_dtx.c
··· 427 427 */ 428 428 if (test_bit(SDTX_DEVICE_SHUTDOWN_BIT, &ddev->flags)) { 429 429 up_write(&ddev->client_lock); 430 + mutex_destroy(&client->read_lock); 430 431 sdtx_device_put(client->ddev); 431 432 kfree(client); 432 433 return -ENODEV;