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-next>] [day] [month] [year] [list]
Date:	Wed, 31 Oct 2007 18:59:02 +0100
From:	Gabriel C <nix.or.die@...glemail.com>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
CC:	netdev <netdev@...r.kernel.org>, tlan-devel@...ts.sourceforge.net,
	chessman@....org
Subject: drivers/net/tlan question

Hi,

I noticed on current git the following warning with !CONFIG_PCI :

...

drivers/net/tlan.c: In function 'TLan_probe1':
drivers/net/tlan.c:682: warning: label 'err_out' defined but not used

...

I thought a simply #ifdef is missing but looking at TLan_probe1() I got confused about err_out_regions

...

#ifdef CONFIG_PCI
        if (pdev) {
                rc = pci_enable_device(pdev);
                if (rc)
                        return rc;

                rc = pci_request_regions(pdev, TLanSignature);
                if (rc) {
                        printk(KERN_ERR "TLAN: Could not reserve IO regions\n");
                        goto err_out;
                }
        }
#endif  /*  CONFIG_PCI  */

        dev = alloc_etherdev(sizeof(TLanPrivateInfo));
        if (dev == NULL) {
                printk(KERN_ERR "TLAN: Could not allocate memory for device.\n");
                rc = -ENOMEM;
                goto err_out_regions;
        }

...

...

err_out_regions:
#ifdef CONFIG_PCI
        if (pdev)
                pci_release_regions(pdev);
#endif
err_out:
        if (pdev)
                pci_disable_device(pdev);
        return rc;

...

It is possible 'dev' to be NULL with !CONFIG_PCI ? If is true then err_out_regions: does nothing ? 

Does this look right ?


Regards,

Gabriel 

 
-
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