Skip to contentSkip to conversation

pps: fix incorrect verdict check

PATCH In review Joonwoo Park 2 participants 2 messages Aug 17, 2009 – Aug 24, 2009 PPS support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pps: fix incorrect verdict check

From: Joonwoo Park <[email protected]>

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

---
drivers/pps/pps.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pps/pps.c +0 -0
index ac8cc8c..fea17e7 100644
@@ -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);
Signature · 1 line
1.5.5.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Joonwoo Park

From: Joonwoo Park <[email protected]>

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

Signature · 5 lines
GNU/Linux Solutions                  e-mail: [email protected]
Linux Device Driver                          [email protected]
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it