Commit 7af39592 authored by Jesper Juhl's avatar Jesper Juhl Committed by Greg Kroah-Hartman

usb/atm/ueagle-atm: Don't test for NULL ptr before calling release_firmware()

release_firmware() deals gracefullt w/ NULL pointers, no need to check
first.
Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e44fabbe
...@@ -1357,11 +1357,9 @@ static int uea_stat_e1(struct uea_softc *sc) ...@@ -1357,11 +1357,9 @@ static int uea_stat_e1(struct uea_softc *sc)
/* release the dsp firmware as it is not needed until /* release the dsp firmware as it is not needed until
* the next failure * the next failure
*/ */
if (sc->dsp_firm) {
release_firmware(sc->dsp_firm); release_firmware(sc->dsp_firm);
sc->dsp_firm = NULL; sc->dsp_firm = NULL;
} }
}
/* always update it as atm layer could not be init when we switch to /* always update it as atm layer could not be init when we switch to
* operational state * operational state
...@@ -1496,11 +1494,9 @@ static int uea_stat_e4(struct uea_softc *sc) ...@@ -1496,11 +1494,9 @@ static int uea_stat_e4(struct uea_softc *sc)
/* release the dsp firmware as it is not needed until /* release the dsp firmware as it is not needed until
* the next failure * the next failure
*/ */
if (sc->dsp_firm) {
release_firmware(sc->dsp_firm); release_firmware(sc->dsp_firm);
sc->dsp_firm = NULL; sc->dsp_firm = NULL;
} }
}
/* always update it as atm layer could not be init when we switch to /* always update it as atm layer could not be init when we switch to
* operational state * operational state
...@@ -2240,7 +2236,6 @@ static void uea_stop(struct uea_softc *sc) ...@@ -2240,7 +2236,6 @@ static void uea_stop(struct uea_softc *sc)
/* flush the work item, when no one can schedule it */ /* flush the work item, when no one can schedule it */
flush_work_sync(&sc->task); flush_work_sync(&sc->task);
if (sc->dsp_firm)
release_firmware(sc->dsp_firm); release_firmware(sc->dsp_firm);
uea_leaves(INS_TO_USBDEV(sc)); uea_leaves(INS_TO_USBDEV(sc));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment