aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/rpmsg/qcom_glink_native.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index fecb1dafa8f3..5dcc9bf1c5bc 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -635,19 +635,18 @@ qcom_glink_alloc_intent(struct qcom_glink *glink,
unsigned long flags;
intent = kzalloc(sizeof(*intent), GFP_KERNEL);
-
if (!intent)
return NULL;
intent->data = kzalloc(size, GFP_KERNEL);
if (!intent->data)
- return NULL;
+ goto free_intent;
spin_lock_irqsave(&channel->intent_lock, flags);
ret = idr_alloc_cyclic(&channel->liids, intent, 1, -1, GFP_ATOMIC);
if (ret < 0) {
spin_unlock_irqrestore(&channel->intent_lock, flags);
- return NULL;
+ goto free_data;
}
spin_unlock_irqrestore(&channel->intent_lock, flags);
@@ -656,6 +655,12 @@ qcom_glink_alloc_intent(struct qcom_glink *glink,
intent->reuse = reuseable;
return intent;
+
+free_data:
+ kfree(intent->data);
+free_intent:
+ kfree(intent);
+ return NULL;
}
static void qcom_glink_handle_rx_done(struct qcom_glink *glink,
sony.c?id=3ae821effdfea47dcb36b52e0a8dffd9757a96a6&follow=1'>HID: sony: fix force feedback mismergeJiri Kosina1-4/+0 2014-04-01HID: sony: Set the quriks flag for Bluetooth controllersFrank Praznik1-0/+10 2014-04-01HID: sony: Fix Sixaxis cable state detectionFrank Praznik1-1/+1 2014-04-01HID: uhid: Add UHID_CREATE2 + UHID_INPUT2Petri Gynther3-0/+112 2014-04-01avr32: replace simple_strtoul() with kstrtoul()Ramkumar Ramachandra1-22/+26 2014-03-31x86: Adjust irq remapping quirk for older revisions of 5500/5520 chipsetsNeil Horman1-9/+6 2014-03-31MIPS: CPC: Use __raw_ memory access functionsPaul Burton1-2/+2 2014-03-31MIPS: CM: use __raw_ memory access functionsPaul Burton1-2/+2 2014-03-31MIPS: Fix warning when including smp-ops.h with CONFIG_SMP=nPaul Burton1-3/+3 2014-03-31MIPS: Malta: GIC IPIs may be used without MTPaul Burton1-8/+11 2014-03-31MIPS: smp-mt: Use common GIC IPI implementationPaul Burton2-22/+2 2014-03-31MIPS: smp-cmp: Remove incorrect core number probePaul Burton1-2/+1 2014-03-31MIPS: Fix gigaton of warning building with microMIPS.Ralf Baechle18-84/+84 2014-03-31MIPS: Fix core number detection for MT coresPaul Burton1-1/+5 2014-03-31MIPS: MT: core_nvpes function to retrieve VPE countPaul Burton1-0/+11 2014-03-31MIPS: Provide empty mips_mt_set_cpuoptions when CONFIG_MIPS_MT=nPaul Burton1-0/+5 2014-03-31MIPS: Lasat: Replace del_timer by del_timer_syncJulia Lawall1-1/+1 2014-03-31MIPS: Malta: Setup PM I/O region on bootPaul Burton2-0/+18