lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 19 Nov 2021 20:20:07 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     M Chetan Kumar <m.chetan.kumar@...ux.intel.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        johannes@...solutions.net, ryazanov.s.a@...il.com,
        loic.poulain@...aro.org, krishna.c.sudi@...el.com,
        m.chetan.kumar@...el.com, linuxwwan@...el.com
Subject: Re: [PATCH V2 net-next 1/2] net: wwan: common debugfs base dir for
 wwan device

On Fri, 19 Nov 2021 15:37:19 +0530 M Chetan Kumar wrote:
> +struct dentry *wwan_get_debugfs_dir(struct device *parent)
> +{
> +	struct wwan_device *wwandev;
> +
> +	if (WARN_ON(!parent))
> +		return ERR_PTR(-EINVAL);

defensive programming, please drop this check

> +	wwandev = wwan_dev_get_by_parent(parent);
> +

please drop empty lines before calls and error checks

> +	if (IS_ERR(wwandev))
> +		return ERR_CAST(wwandev);
> +
> +	return wwandev->debugfs_dir;
> +}
> +EXPORT_SYMBOL_GPL(wwan_get_debugfs_dir);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ