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

Commit b153e73b authored by Arun Kumar Neelakantam's avatar Arun Kumar Neelakantam Committed by Gerrit - the friendly Code Review server
Browse files

drivers: char: msm_smd_pkt: Return error in case driver is not ready



In some cases RPMSG callback is called before RPMSG probe complete.

Return error code from call back to avoid invalid access when probe
is not completed.

Change-Id: Ib3dbec47e44d7542c8d3d44aefe3cb750384f5b5
Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
parent 176254e5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -168,6 +168,9 @@ static int smd_pkt_rpdev_cb(struct rpmsg_device *rpdev, void *buf, int len,
	unsigned long flags;
	struct sk_buff *skb;

	if (!smd_pkt_devp)
		return -EINVAL;

	skb = alloc_skb(len, GFP_ATOMIC);

	if (!skb)