> +u8 > +mpt3sas_base_pci_device_is_available(struct MPT3SAS_ADAPTER *ioc) > +{ > + if (ioc->pci_error_recovery || > + (!pci_device_is_present(ioc->pdev))) > + return 0; > + > + return 1; > +} This should simplify be: bool mpt3sas_base_pci_device_is_available(struct MPT3SAS_ADAPTER *ioc) { return !ioc->pci_error_recovery && pci_device_is_present(ioc->pdev); } probably even as an inline..