[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A89813A.4060603@gmail.com>
Date: Mon, 17 Aug 2009 09:11:38 -0700
From: Joonwoo Park <joonwpark81@...il.com>
To: Rodolfo Giometti <giometti@...eenne.com>,
Linux PPS <linuxpps@...enneenne.com>
CC: Linux Kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] pps: fix incorrect verdict check
From: Joonwoo Park <joonwpark81@...il.com>
Fix incorrect verdict check and returns error if device_create failed,
otherwise driver triggers kernel oops.
Signed-off-by: Joonwoo Park<joonwpark81@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists