pps: fix incorrect verdict check
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.
Signed-off-by Joonwoo Park<[email protected]>
---drivers/pps/pps.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pps/pps.c +0 -0
@@ -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
Quoted 6 lines · Joonwoo Park
From: Joonwoo Park <[email protected]>
Fix incorrect verdict check and returns error if
device_createfailed, otherwise driver triggers kernel oops.Signed-off-by Joonwoo Park<[email protected]>
Acked-by Rodolfo Giometti <[email protected]>
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