Message ID | 20211025162452.1.Id19324ea36b4cf89faf98bf520bc6b6f01240433@changeid (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Fix two kernel warnings in glink driver | expand |
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index e1444fefdd1c0..cc3556a9385a9 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -270,6 +270,7 @@ static void qcom_glink_channel_release(struct kref *ref) spin_unlock_irqrestore(&channel->intent_lock, flags); kfree(channel->name); + channel = NULL; kfree(channel); } @@ -1372,8 +1373,10 @@ static void qcom_glink_rpdev_release(struct device *dev) { struct rpmsg_device *rpdev = to_rpmsg_device(dev); struct glink_channel *channel = to_glink_channel(rpdev->ept); + if (channel) { + channel->rpdev = NULL; + } - channel->rpdev = NULL; kfree(rpdev); }