interrupts = <0 131 0>;
usb-phy = <&qusb_phy0>, <&ssphy>;
tx-fifo-resize;
+ snps,dis_u2_susphy_quirk;
+ snps,dis_enblslpm_quirk;
snps,usb3-u1u2-disable;
snps,nominal-elastic-buffer;
snps,is-utmi-l1-suspend;
interrupts = <0 138 0>;
usb-phy = <&qusb_phy1>, <&usb_nop_phy>;
maximum-speed = "high-speed";
+ snps,dis_u2_susphy_quirk;
+ snps,dis_enblslpm_quirk;
snps,nominal-elastic-buffer;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
GIPC_Result result = GIPC_Success;
uint8_t *msg = NULL;
+ if (!dev) {
+ pr_err("no send pchan %s has been de-alloced msg for %zd bytes\n",
+ pchan->name);
+ return -ENODEV;
+ }
+
spin_lock_bh(&dev->io_lock);
result = GIPC_PrepareMessage(dev->endpoint, sizebytes+sizeof(*header),
(struct physical_channel *)physical_channel;
struct ghs_vdev *dev = (struct ghs_vdev *)pchan->hyp_data;
GIPC_Result result = GIPC_Success;
-
uint32_t events;
unsigned long flags;
+ if (!dev) {
+ pr_err("no recv pchan %s has been de-alloced msg for %zd bytes\n",
+ pchan->name);
+ return;
+ }
+
spin_lock_irqsave(&pchan->rxbuf_lock, flags);
events = kgipc_dequeue_events(dev->endpoint);
spin_unlock_irqrestore(&pchan->rxbuf_lock, flags);
kgipc_endpoint_free(dev->endpoint);
kfree(dev->read_data);
kfree(dev);
-
+ pchan->closed = 1;
+ pchan->hyp_data = NULL;
if (get_refcnt(pchan->refcount) > 1) {
pr_warn("potential leak pchan %s vchans %d refcnt %d\n",
pchan->name, pchan->vcnt, get_refcnt(pchan->refcount));