Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1271642 > unrolled thread

[PATCH] m5602: correctly check failed thread creation

Started byInsu Yun <wuninsu@gmail.com>
First post2015-11-17 21:40 +0100
Last post2015-11-17 21:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] m5602: correctly check failed thread creation Insu Yun <wuninsu@gmail.com> - 2015-11-17 21:40 +0100

#1271642 — [PATCH] m5602: correctly check failed thread creation

FromInsu Yun <wuninsu@gmail.com>
Date2015-11-17 21:40 +0100
Subject[PATCH] m5602: correctly check failed thread creation
Message-ID<qvVcL-1sl-35@gated-at.bofh.it>
Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 drivers/media/usb/gspca/m5602/m5602_s5k83a.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
index bf6b215..84b2961 100644
--- a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
+++ b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
@@ -221,6 +221,9 @@ int s5k83a_start(struct sd *sd)
 	   to assume that there is no better way of accomplishing this */
 	sd->rotation_thread = kthread_create(rotation_thread_function,
 					     sd, "rotation thread");
+	if (IS_ERR(sd->rotation_thread))
+		return PTR_ERR(sd->rotation_thread);
+
 	wake_up_process(sd->rotation_thread);
 
 	/* Preinit the sensor */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web