qat: Fix nits reported by Coverity
MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate)
This commit is contained in:
parent
6cd88fe0e0
commit
381219b64d
@ -573,7 +573,8 @@ qat_detach(device_t dev)
|
||||
sc->sc_ih_cookie = NULL;
|
||||
}
|
||||
if (sc->sc_ih != NULL) {
|
||||
(void)bus_release_resource(dev, SYS_RES_IRQ, i + 1, sc->sc_ih);
|
||||
(void)bus_release_resource(dev, SYS_RES_IRQ,
|
||||
sc->sc_hw.qhw_num_banks + 1, sc->sc_ih);
|
||||
sc->sc_ih = NULL;
|
||||
}
|
||||
pci_release_msi(dev);
|
||||
|
@ -2616,7 +2616,7 @@ qat_aefw_suof_load(struct qat_softc *sc, struct qat_dmamem *dma)
|
||||
static int
|
||||
qat_aefw_suof_write(struct qat_softc *sc)
|
||||
{
|
||||
struct qat_suof_image *qsi = NULL;
|
||||
struct qat_suof_image *qsi;
|
||||
int i, error = 0;
|
||||
|
||||
for (i = 0; i < sc->sc_aefw_suof.qafs_num_simgs; i++) {
|
||||
@ -2626,21 +2626,20 @@ qat_aefw_suof_write(struct qat_softc *sc)
|
||||
if (error)
|
||||
return error;
|
||||
error = qat_aefw_auth(sc, &qsi->qsi_dma);
|
||||
if (error)
|
||||
goto fail;
|
||||
if (error) {
|
||||
qat_free_dmamem(sc, &qsi->qsi_dma);
|
||||
return error;
|
||||
}
|
||||
error = qat_aefw_suof_load(sc, &qsi->qsi_dma);
|
||||
if (error)
|
||||
goto fail;
|
||||
|
||||
if (error) {
|
||||
qat_free_dmamem(sc, &qsi->qsi_dma);
|
||||
return error;
|
||||
}
|
||||
qat_free_dmamem(sc, &qsi->qsi_dma);
|
||||
}
|
||||
qat_free_mem(sc->sc_aefw_suof.qafs_simg);
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
if (qsi != NULL)
|
||||
qat_free_dmamem(sc, &qsi->qsi_dma);
|
||||
return error;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -594,7 +594,7 @@ struct qat_crypto_desc {
|
||||
bus_addr_t qcd_desc_paddr;
|
||||
bus_addr_t qcd_hash_state_paddr;
|
||||
|
||||
enum fw_slice qcd_slices[MAX_FW_SLICE];
|
||||
enum fw_slice qcd_slices[MAX_FW_SLICE + 1];
|
||||
enum fw_la_cmd_id qcd_cmd_id;
|
||||
enum hw_cipher_dir qcd_cipher_dir;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user