mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
media: siano: fix device register error path
[ Upstream commit 5368b1ee29 ]
As reported by smatch:
drivers/media/common/siano/smsdvb-main.c:1231 smsdvb_hotplug() warn: '&client->entry' not removed from list
If an error occur at the end of the registration logic, it won't
drop the device from the list.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5f6f52d667
commit
2f6d707fab
@@ -1187,6 +1187,10 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,
|
||||
return 0;
|
||||
|
||||
media_graph_error:
|
||||
mutex_lock(&g_smsdvb_clientslock);
|
||||
list_del(&client->entry);
|
||||
mutex_unlock(&g_smsdvb_clientslock);
|
||||
|
||||
smsdvb_debugfs_release(client);
|
||||
|
||||
client_error:
|
||||
|
||||
Reference in New Issue
Block a user