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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Jan 2016 17:27:41 +0100
From:	Andrew Lunn <andrew@...n.ch>
To:	SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:	Dan Carpenter <dan.carpenter@...cle.com>,
	"David S. Miller" <davem@...emloft.net>,
	Igal Liberman <igal.liberman@...escale.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] fsl/fman: Delete one function call "put_device" in
 dtsec_config()

On Thu, Jan 14, 2016 at 04:00:46PM +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Thu, 14 Jan 2016 15:46:28 +0100
> 
> The Coccinelle semantic patch script "deref_null.cocci" pointed a problem
> out in the implementation of the function "dtsec_config".
> 
> A null pointer was assigned to the data structure member "tbiphy" of the
> variable "dtsec" if a matching device was not found.
> A call of the function "put_device" was unnecessary then because
> a previous call of the function "get_device" was not triggered.
> Thus remove the function call "put_device" after the printing of the
> desired error message.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>

Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support")
Reviewd-by: Andrew Lunn <andrew@...n.ch>

	    Andrew
> ---
>  drivers/net/ethernet/freescale/fman/fman_dtsec.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
> index 6b1261c..7c92eb8 100644
> --- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
> +++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
> @@ -1434,7 +1434,6 @@ struct fman_mac *dtsec_config(struct fman_mac_params *params)
>  	dtsec->tbiphy = of_phy_find_device(params->internal_phy_node);
>  	if (!dtsec->tbiphy) {
>  		pr_err("of_phy_find_device (TBI PHY) failed\n");
> -		put_device(&dtsec->tbiphy->mdio.dev);
>  		goto err_dtsec_drv_param;
>  	}
>  
> -- 
> 2.6.3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ