mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 21:26:51 +00:00
pci_register_lkm can fail gracefully, so let it do that when there is
no more memory (M_WAITOK -> M_NOWAIT). It may be called early enough during boot that M_WAITOK isn't OK. (In theory - right now it isn't called from anywhere).
This commit is contained in:
parent
ee45a71480
commit
1025c39862
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45571
|
@ -23,7 +23,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: pci_compat.c,v 1.19 1999/01/14 06:22:10 jdp Exp $
|
||||
* $Id: pci_compat.c,v 1.20 1999/01/19 23:29:19 se Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -460,7 +460,7 @@ int pci_register_lkm (struct pci_device *dvp, int if_revision)
|
|||
if (dvp == NULL || dvp->pd_probe == NULL || dvp->pd_attach == NULL) {
|
||||
return (-1);
|
||||
}
|
||||
lkm = malloc (sizeof (*lkm), M_DEVBUF, M_WAITOK);
|
||||
lkm = malloc (sizeof (*lkm), M_DEVBUF, M_NOWAIT);
|
||||
if (lkm == NULL) {
|
||||
return (-1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue