Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9333744d authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Greg Kroah-Hartman
Browse files

RAW driver: Remove call to kobject_put().



If cdev_add() fails, there is no justification for subsequently
calling kobject_put().

Signed-off-by: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b50fa7c8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -339,7 +339,6 @@ static int __init raw_init(void)
	cdev_init(&raw_cdev, &raw_fops);
	ret = cdev_add(&raw_cdev, dev, max_raw_minors);
	if (ret) {
		kobject_put(&raw_cdev.kobj);
		goto error_region;
	}