[PATCH 08/14] xfree86: delete useless "Primary device is not PCI" message

Daniel Stone daniel at fooishbar.org
Tue Jun 1 08:30:14 PDT 2010


On Tue, Jun 01, 2010 at 05:59:04PM +0300, Tiago Vignatti wrote:
> It's not PCI? So what?!
> 
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> ---
>  hw/xfree86/common/xf86pciBus.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
> index a751427..b64bae3 100644
> --- a/hw/xfree86/common/xf86pciBus.c
> +++ b/hw/xfree86/common/xf86pciBus.c
> @@ -1318,14 +1318,8 @@ xf86PciMatchDriver(char* matches[], int nmatches) {
>      }
>  
>      pci_iterator_destroy(iter);
> -
> -    if (!info) {
> -	ErrorF("Primary device is not PCI\n");
> -    }
>  #ifdef __linux__
> -    else {
>  	matchDriverFromFiles(matches, info->vendor_id, info->device_id);
> -    }
>  #endif /* __linux__ */
>  
>      for (i = 0; (i < nmatches) && (matches[i]); i++) {

Er, this changes the behaviour for non-PCI primary devices from printing
an arguably useless error, to segfaulting because info is NULL and is
now dereferenced unconditionally.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100601/a04bcab4/attachment.pgp>


More information about the xorg-devel mailing list