public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pps: fix incorrect verdict check
@ 2009-08-17 16:11 Joonwoo Park
  2009-08-24  7:55 ` Rodolfo Giometti
  0 siblings, 1 reply; 2+ messages in thread
From: Joonwoo Park @ 2009-08-17 16:11 UTC (permalink / raw)
  To: Rodolfo Giometti, Linux PPS; +Cc: Linux Kernel

From: Joonwoo Park <joonwpark81@gmail.com>

Fix incorrect verdict check and returns error if device_create failed,
otherwise driver triggers kernel oops.

Signed-off-by: Joonwoo Park<joonwpark81@gmail.com>
---
 drivers/pps/pps.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c
index ac8cc8c..fea17e7 100644
--- a/drivers/pps/pps.c
+++ b/drivers/pps/pps.c
@@ -244,7 +244,7 @@ int pps_register_cdev(struct pps_device *pps)
 	}
 	pps->dev = device_create(pps_class, pps->info.dev, pps->devno, NULL,
 							"pps%d", pps->id);
-	if (err)
+	if (IS_ERR(pps->dev))
 		goto del_cdev;
 	dev_set_drvdata(pps->dev, pps);
 
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-24  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-17 16:11 [PATCH] pps: fix incorrect verdict check Joonwoo Park
2009-08-24  7:55 ` Rodolfo Giometti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox