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

Commit 2254e64f authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 3646e168 1c3bacb0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -169,6 +169,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)