lkml.org 
[lkml]   [2020]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/3] net: qrtr: Add MHI transport layer
From
Date
> Hence, this commit adds MHI transport layer support to QRTR for
> transferring the QMI messages over IPC Router.

I suggest to reconsider software development consequences around
another implementation detail.



> +static int qcom_mhi_qrtr_send(struct qrtr_endpoint *ep, struct sk_buff *skb)
> +{

> + rc = mhi_queue_skb(qdev->mhi_dev, DMA_TO_DEVICE, skb, skb->len,
> + MHI_EOT);
> + if (rc) {
> + kfree_skb(skb);
> + return rc;
> + }

> +}

I propose again to add a jump target so that a bit of exception handling code
can be better reused at the end of this function implementation.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=b2768df24ec400dd4f7fa79542f797e904812053#n450

+ if (rc)
+ goto free_skb;

+ return rc;
+
+free_skb:
+ kfree_skb(skb);
+ return rc;
+}


Regards,
Markus

\
 
 \ /
  Last update: 2020-04-26 15:46    [W:0.113 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site