rpmsg updates for v6.1
This fixes a double free/destroy and drops an unnecessary local variable in the rpmsg char driver. -----BEGIN PGP SIGNATURE----- iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmM/hs0VHGFuZGVyc3Nv bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FB9cP/ROmaAszjrZdJo7FhUIomvE50a/m iuxqKcRtgd3gcnNe/PWBinz8ERNhYEmO3blsSWbFehJAHFR/0+q/KW7QtuXAmbT9 tEBLuqTWANEgANdlc6kjmhGdDwDqf2zpSFUx0oxo1gj+Pkjle2CfXnhNk6lkkxSa /m5WHo5K1MVYGwWF8DrRKD8+YMZ/sWwWJze8nseALr98IA0ZRL/ykP2uzBEY1c30 EXV/uR6d4CadqtbtUJUNxQJVs29J+aJ2sYn3l8RqqxhkWnCVKCAj+wUliNXUWQPr 59QmXCcJj+2A2igVI3Qmro52lueP3D1G+ZjL+1V0FiOtD89E/+MxNC92WmBt6E13 PtJSGoMccDoQrEXnNvVm7gqz6S2iPMQpphvxrjU8UOLnbHwIzGq1256L+T9oUaMX T0F9XoX+KzZJqsVmU0/UgrKW44MKlBdUnRvE5zLEBLQsrN/YCcLqefbHAmOPwCmw E1/Sx8J3o6W9XwjczqpDf4q/ZHfzvPxKrCQ0KnwXoIc2fbNGij7XdCiSYYl0QrTx ZzV6t6gYIBPqTX1ntVRhx/EcVjRNbPAaMRxgGmNn6OZqf5joII8VARyl5+OQ6wJ7 oUBt2tAHUYHtD1TfQm3vWMCNXG27r5GarW2ObD95esv+UgydUagahAmwZw5n/gvM eNNWp6bXLMuiUQf7 =UUCR -----END PGP SIGNATURE----- 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:
commit
e5df1d3ebe
@ -76,7 +76,9 @@ int rpmsg_chrdev_eptdev_destroy(struct device *dev, void *data)
|
|||||||
|
|
||||||
mutex_lock(&eptdev->ept_lock);
|
mutex_lock(&eptdev->ept_lock);
|
||||||
if (eptdev->ept) {
|
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;
|
eptdev->ept = NULL;
|
||||||
}
|
}
|
||||||
mutex_unlock(&eptdev->ept_lock);
|
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_channel_info chinfo)
|
||||||
{
|
{
|
||||||
struct rpmsg_eptdev *eptdev;
|
struct rpmsg_eptdev *eptdev;
|
||||||
int ret;
|
|
||||||
|
|
||||||
eptdev = rpmsg_chrdev_eptdev_alloc(rpdev, parent);
|
eptdev = rpmsg_chrdev_eptdev_alloc(rpdev, parent);
|
||||||
if (IS_ERR(eptdev))
|
if (IS_ERR(eptdev))
|
||||||
return PTR_ERR(eptdev);
|
return PTR_ERR(eptdev);
|
||||||
|
|
||||||
ret = rpmsg_chrdev_eptdev_add(eptdev, chinfo);
|
return rpmsg_chrdev_eptdev_add(eptdev, chinfo);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(rpmsg_chrdev_eptdev_create);
|
EXPORT_SYMBOL(rpmsg_chrdev_eptdev_create);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user