lkml.org 
[lkml]   [2019]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/5] mt76: fix a leaked reference by adding a missing of_node_put
From
Date
> @@ -54,22 +54,30 @@  mt76_get_of_eeprom(struct mt76_dev *dev, int len)
> part = np->name;
>
> mtd = get_mtd_device_nm(part);

> + if (retlen < len) {
> + ret = -EINVAL;
> + goto out_put_node;

I find a jump to an immediately following source code place unnecessary.
Would you like to delete it?


> + }
>
> - return 0;
> +out_put_node:
> + of_node_put(np);
> + return ret;
> #else

Can another bit of fine-tuning matter here?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/net/wireless/mediatek/mt76/eeprom.c?id=34e022d8b780a03902d82fb3997ba7c7b1f40c81#n73

Regards,
Markus

\
 
 \ /
  Last update: 2019-04-05 15:18    [W:0.048 / U:18.404 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site