From: Joonwoo Park <joonwpark81@gmail.com>
To: Rodolfo Giometti <giometti@enneenne.com>,
Linux PPS <linuxpps@ml.enneenne.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] pps: fix incorrect verdict check
Date: Mon, 17 Aug 2009 09:11:38 -0700 [thread overview]
Message-ID: <4A89813A.4060603@gmail.com> (raw)
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
next reply other threads:[~2009-08-17 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 16:11 Joonwoo Park [this message]
2009-08-24 7:55 ` [PATCH] pps: fix incorrect verdict check Rodolfo Giometti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A89813A.4060603@gmail.com \
--to=joonwpark81@gmail.com \
--cc=giometti@enneenne.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxpps@ml.enneenne.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox