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


Groups > linux.kernel > #1271642

[PATCH] m5602: correctly check failed thread creation

From Insu Yun <wuninsu@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] m5602: correctly check failed thread creation
Date 2015-11-17 21:40 +0100
Message-ID <qvVcL-1sl-35@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web