mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
rpmsg: Guard against null endpoint ops in destroy
In RPMSG GLINK the chrdev device will allocate an ept as part of the rpdev creation. This device will not register endpoint ops even though it has an allocated ept. Protect against the case where the device is being destroyed. Signed-off-by: Chris Lew <clew@codeaurora.org> Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org> Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org> Link: https://lore.kernel.org/r/1593017121-7953-3-git-send-email-deesin@codeaurora.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
parent
4fcdaf6e28
commit
d5158cda9e
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ EXPORT_SYMBOL(rpmsg_create_ept);
|
|||
*/
|
||||
void rpmsg_destroy_ept(struct rpmsg_endpoint *ept)
|
||||
{
|
||||
if (ept)
|
||||
if (ept && ept->ops)
|
||||
ept->ops->destroy_ept(ept);
|
||||
}
|
||||
EXPORT_SYMBOL(rpmsg_destroy_ept);
|
||||
|
|
Loading…
Add table
Reference in a new issue