mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
qat: Initialize the crypto device ID to -1 instead of 0
Otherwise qat_detach() may attempt to deregister an unrelated crypto driver if an error occurs in qat_attach() before crypto_get_driverid() is called, since 0 is a valid driver ID. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate)
This commit is contained in:
parent
7695ced633
commit
e4b675c929
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368194
|
@ -357,6 +357,7 @@ qat_attach(device_t dev)
|
|||
|
||||
sc->sc_dev = dev;
|
||||
sc->sc_rev = pci_get_revid(dev);
|
||||
sc->sc_crypto.qcy_cid = -1;
|
||||
|
||||
qatp = qat_lookup(dev);
|
||||
memcpy(&sc->sc_hw, qatp->qatp_hw, sizeof(struct qat_hw));
|
||||
|
|
Loading…
Reference in a new issue