aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoonwoo Park <joonwpark81@gmail.com>2009-08-26 17:29:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-26 23:06:52 -0400
commit054b2b13ccba4876a1ce98a7ede7dab7d6893d01 (patch)
tree0421da355e30375d251e0fdb570fce2518e7a201 /drivers
parentf415c413f458837bd0c27086b79aca889f9435e4 (diff)
pps: fix incorrect verdict check
Fix incorrect verdict check and returns error if device_create failed, otherwise driver triggers kernel oops. Signed-off-by: Joonwoo Park<joonwpark81@gmail.com> Cc: Rodolfo Giometti <giometti@enneenne.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pps/pps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c
index ac8cc8cea1e3..fea17e7805e9 100644
--- a/drivers/pps/pps.c
+++ b/drivers/pps/pps.c
@@ -244,7 +244,7 @@ int pps_register_cdev(struct pps_device *pps)
244 } 244 }
245 pps->dev = device_create(pps_class, pps->info.dev, pps->devno, NULL, 245 pps->dev = device_create(pps_class, pps->info.dev, pps->devno, NULL,
246 "pps%d", pps->id); 246 "pps%d", pps->id);
247 if (err) 247 if (IS_ERR(pps->dev))
248 goto del_cdev; 248 goto del_cdev;
249 dev_set_drvdata(pps->dev, pps); 249 dev_set_drvdata(pps->dev, pps);
250 250