linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s5p_mfc: handling failed allocation for workqueue
@ 2016-02-16  2:46 Insu Yun
  0 siblings, 0 replies; only message in thread
From: Insu Yun @ 2016-02-16  2:46 UTC (permalink / raw)
  To: kyungmin.park, k.debski, jtp.park, mchehab, linux-arm-kernel,
	linux-media, linux-kernel
  Cc: taesoo, yeongjin.jang, insu, changwoo, Insu Yun

create_singlethread_workqueue() can be failed in memory pressure.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 927ab49..631aea814 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1239,6 +1239,10 @@ static int s5p_mfc_probe(struct platform_device *pdev)
 
 	dev->hw_lock = 0;
 	dev->watchdog_workqueue = create_singlethread_workqueue(S5P_MFC_NAME);
+	if (!dev->watchdog_workqueue) {
+		ret = -ENOMEM;
+		goto err_enc_reg;
+	}
 	INIT_WORK(&dev->watchdog_work, s5p_mfc_watchdog_worker);
 	atomic_set(&dev->watchdog_cnt, 0);
 	init_timer(&dev->watchdog_timer);
-- 
1.9.1


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

only message in thread, other threads:[~2016-02-16  2:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16  2:46 [PATCH] s5p_mfc: handling failed allocation for workqueue Insu Yun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).