mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 12:55:24 -04:00
Merge tag 'rpmsg-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux
Pull rpmsg updates from Bjorn Andersson: "This fixes a double free/destroy and drops an unnecessary local variable in the rpmsg char driver" * tag 'rpmsg-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: rpmsg: char: Avoid double destroy of default endpoint rpmsg: char: Remove the unneeded result variable
This commit is contained in:
@@ -76,7 +76,9 @@ int rpmsg_chrdev_eptdev_destroy(struct device *dev, void *data)
|
||||
|
||||
mutex_lock(&eptdev->ept_lock);
|
||||
if (eptdev->ept) {
|
||||
rpmsg_destroy_ept(eptdev->ept);
|
||||
/* The default endpoint is released by the rpmsg core */
|
||||
if (!eptdev->default_ept)
|
||||
rpmsg_destroy_ept(eptdev->ept);
|
||||
eptdev->ept = NULL;
|
||||
}
|
||||
mutex_unlock(&eptdev->ept_lock);
|
||||
@@ -424,15 +426,12 @@ int rpmsg_chrdev_eptdev_create(struct rpmsg_device *rpdev, struct device *parent
|
||||
struct rpmsg_channel_info chinfo)
|
||||
{
|
||||
struct rpmsg_eptdev *eptdev;
|
||||
int ret;
|
||||
|
||||
eptdev = rpmsg_chrdev_eptdev_alloc(rpdev, parent);
|
||||
if (IS_ERR(eptdev))
|
||||
return PTR_ERR(eptdev);
|
||||
|
||||
ret = rpmsg_chrdev_eptdev_add(eptdev, chinfo);
|
||||
|
||||
return ret;
|
||||
return rpmsg_chrdev_eptdev_add(eptdev, chinfo);
|
||||
}
|
||||
EXPORT_SYMBOL(rpmsg_chrdev_eptdev_create);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user