Search Linux Wireless

Re: [PATCH v1 4/5] PCI: Adapt all code locations to not use struct pci_dev::driver directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/29/21 4:37 PM, Uwe Kleine-König wrote:

> --- a/drivers/pci/xen-pcifront.c
> +++ b/drivers/pci/xen-pcifront.c
> @@ -599,12 +599,12 @@ static pci_ers_result_t pcifront_common_process(int cmd,
>  	result = PCI_ERS_RESULT_NONE;
>  
>  	pcidev = pci_get_domain_bus_and_slot(domain, bus, devfn);
> -	if (!pcidev || !pcidev->driver) {
> +	pdrv = pci_driver_of_dev(pcidev);
> +	if (!pcidev || !pdrv) {


If pcidev is NULL we are dead by the time we reach 'if' statement.


-boris



>  		dev_err(&pdev->xdev->dev, "device or AER driver is NULL\n");
>  		pci_dev_put(pcidev);
>  		return result;
>  	}
> -	pdrv = pcidev->driver;
>  



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux