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]
Message-ID: <55880105-a097-0268-de54-478d7dbae084@broadcom.com>
Date:   Wed, 3 Feb 2021 11:15:35 -0800
From:   Scott Branden <scott.branden@...adcom.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Desmond Yan <desmond.yan@...adcom.com>,
        Olof Johansson <olof@...om.net>,
        James Hu <james.hu@...adcom.com>,
        bcm-kernel-feedback-list@...adcom.com,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] misc: bcm-vk: Fix a couple error codes in probe()

Thanks Dan,

On 2021-02-03 6:42 a.m., Dan Carpenter wrote:
> These errors should return negative error codes instead of returning
> success.
Do you have a script running to report such issues or just manually reviewing
to find such paths?
>
> Fixes: 064ffc7c3939 ("misc: bcm-vk: add autoload support")
> Fixes: 522f692686a7 ("misc: bcm-vk: add Broadcom VK driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Acked-by: Scott Branden <scott.branden@...adcom.com>
> ---
>  drivers/misc/bcm-vk/bcm_vk_dev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/misc/bcm-vk/bcm_vk_dev.c b/drivers/misc/bcm-vk/bcm_vk_dev.c
> index c3d2bba68ef1..a82a8927d92b 100644
> --- a/drivers/misc/bcm-vk/bcm_vk_dev.c
> +++ b/drivers/misc/bcm-vk/bcm_vk_dev.c
> @@ -1358,6 +1358,7 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  		vk->bar[i] = pci_ioremap_bar(pdev, i * 2);
>  		if (!vk->bar[i]) {
>  			dev_err(dev, "failed to remap BAR%d\n", i);
> +			err = -ENOMEM;
>  			goto err_iounmap;
>  		}
>  	}
> @@ -1463,7 +1464,8 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	boot_status = vkread32(vk, BAR_0, BAR_BOOT_STATUS);
>  	if (auto_load) {
>  		if ((boot_status & BOOT_STATE_MASK) == BROM_RUNNING) {
> -			if (bcm_vk_trigger_autoload(vk))
> +			err = bcm_vk_trigger_autoload(vk);
> +			if (err)
>  				goto err_bcm_vk_tty_exit;
>  		} else {
>  			dev_err(dev,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ