lkml.org 
[lkml]   [2022]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 3/3] Staging: rtl8192e: Cleaning up error handling
On Thu, Jun 23, 2022 at 10:44 PM Felix Schlepper <f3sch.git@outlook.com> wrote:
>
> Moved error handling to one common block.
> This removes double checking if all txb->fragments[]
> were initialized.
> The original code worked fine, but this is cleaner.

...

> +err_free:
> + while (--i >= 0)

while (i--)

will suffice.

> + dev_kfree_skb_any(txb->fragments[i]);
> + kfree(txb);
> +
> + return NULL;

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-06-23 23:22    [W:0.414 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site