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

Commit 8ee90c66 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "voice_svc: Avoid double free in voice_svc driver"

parents 0b4887e7 5ed5f56e
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -773,7 +773,7 @@ static int voice_svc_probe(struct platform_device *pdev)
	if (ret) {
		pr_err("%s: Failed to alloc chrdev\n", __func__);
		ret = -ENODEV;
		goto chrdev_err;
		goto done;
	}

	voice_svc_dev->major = MAJOR(device_num);
@@ -820,8 +820,6 @@ dev_err:
	class_destroy(voice_svc_class);
class_err:
	unregister_chrdev_region(0, MINOR_NUMBER);
chrdev_err:
	kfree(voice_svc_dev);
done:
	return ret;
}
@@ -835,7 +833,6 @@ static int voice_svc_remove(struct platform_device *pdev)
	device_destroy(voice_svc_class, device_num);
	class_destroy(voice_svc_class);
	unregister_chrdev_region(0, MINOR_NUMBER);
	kfree(voice_svc_dev);

	return 0;
}