All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: most: hdm-usb: Remove invalid reference error
@ 2016-03-11 18:41 Amitoj Kaur Chawla
  0 siblings, 0 replies; only message in thread
From: Amitoj Kaur Chawla @ 2016-03-11 18:41 UTC (permalink / raw)
  To: outreachy-kernel

commit e3479f77("staging: most: hdm-usb: Remove create_workqueue()")
cancel_work_sync(&anchor->clear_work_obj) is introduced after freeing 
`anchor` causing a invalid reference error. This patch removes this
error by shifting the call to cancel_work_sync before freeing 
`anchor`.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/staging/most/hdm-usb/hdm_usb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 9d5555d..ff057b8 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -221,11 +221,10 @@ static void free_anchored_buffers(struct most_dev *mdev, unsigned int channel)
 		}
 		spin_lock_irqsave(&mdev->anchor_list_lock[channel], flags);
 		list_del(&anchor->list);
+		cancel_work_sync(&anchor->clear_work_obj);
 		kfree(anchor);
 	}
 	spin_unlock_irqrestore(&mdev->anchor_list_lock[channel], flags);
-
-	cancel_work_sync(&anchor->clear_work_obj);
 }
 
 /**
-- 
1.9.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-11 18:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11 18:41 [PATCH] staging: most: hdm-usb: Remove invalid reference error Amitoj Kaur Chawla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.