diff options
author | Jesper Juhl <jj@chaosbits.net> | 2012-04-09 22:52:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-18 22:52:35 +0200 |
commit | 7af395922a9f2ba72f40a09641347b31cd1abad4 (patch) | |
tree | 0f324aff546a0f12f691fc52477ee5d72816c72d | |
parent | usb/storage/ene_ub6250: Remove redundant NULL check before release_firmware()... (diff) | |
download | linux-7af395922a9f2ba72f40a09641347b31cd1abad4.tar.xz linux-7af395922a9f2ba72f40a09641347b31cd1abad4.zip |
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: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/atm/ueagle-atm.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index 01ea5d7421d4..d7e422dc0ef7 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c @@ -1357,10 +1357,8 @@ static int uea_stat_e1(struct uea_softc *sc) /* release the dsp firmware as it is not needed until * the next failure */ - if (sc->dsp_firm) { - release_firmware(sc->dsp_firm); - sc->dsp_firm = NULL; - } + release_firmware(sc->dsp_firm); + sc->dsp_firm = NULL; } /* always update it as atm layer could not be init when we switch to @@ -1496,10 +1494,8 @@ static int uea_stat_e4(struct uea_softc *sc) /* release the dsp firmware as it is not needed until * the next failure */ - if (sc->dsp_firm) { - release_firmware(sc->dsp_firm); - sc->dsp_firm = NULL; - } + release_firmware(sc->dsp_firm); + sc->dsp_firm = NULL; } /* always update it as atm layer could not be init when we switch to @@ -2240,8 +2236,7 @@ static void uea_stop(struct uea_softc *sc) /* flush the work item, when no one can schedule it */ 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)); } |