Skip to content

Commit

Permalink
pps: fix incorrect verdict check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joonwoo Park authored and Linus Torvalds committed Aug 27, 2009
1 parent f415c41 commit 054b2b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pps/pps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 054b2b1

Please sign in to comment.