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:	Fri, 20 Jun 2014 12:09:37 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Daeseok Youn <daeseok.youn@...il.com>
Cc:	lidza.louina@...il.com, gregkh@...uxfoundation.org,
	devel@...verdev.osuosl.org, driverdev-devel@...uxdriverproject.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: dgap: make dgap_found_board() return a brd
 pointer

On Fri, Jun 20, 2014 at 02:19:58PM +0900, Daeseok Youn wrote:
> -	rc = dgap_found_board(pdev, ent->driver_data, dgap_numboards);
> -	if (rc)
> +	brd = dgap_found_board(pdev, ent->driver_data, dgap_numboards);
> +	if (IS_ERR(brd))
>  		return rc;

		return ERR_PTR(brd);


>  
> -	brd = dgap_board[dgap_numboards++];
>  	rc = dgap_firmware_load(pdev, ent->driver_data, brd);
>  	if (rc)
>  		goto cleanup_brd;
> @@ -617,6 +617,8 @@ static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	brd->state = BOARD_READY;
>  	brd->dpastatus = BD_RUNNING;
>  
> +	dgap_board[dgap_numboards++] = brd;

You need to update the error handling of this function to remove the
reference do dgap_board[] as well.

> +
>  	return 0;
>  

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ