diff options
author | Jesper Juhl <jj@chaosbits.net> | 2012-04-09 16:52:26 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-18 16:52:35 -0400 |
commit | 7af395922a9f2ba72f40a09641347b31cd1abad4 (patch) | |
tree | 0f324aff546a0f12f691fc52477ee5d72816c72d /drivers/usb | |
parent | e44fabbe7fbf8c71cd2e7d28078202e557b4e057 (diff) |
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>
Diffstat (limited to 'drivers/usb')
-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) | |||
1357 | /* release the dsp firmware as it is not needed until | 1357 | /* release the dsp firmware as it is not needed until |
1358 | * the next failure | 1358 | * the next failure |
1359 | */ | 1359 | */ |
1360 | if (sc->dsp_firm) { | 1360 | release_firmware(sc->dsp_firm); |
1361 | release_firmware(sc->dsp_firm); | 1361 | sc->dsp_firm = NULL; |
1362 | sc->dsp_firm = NULL; | ||
1363 | } | ||
1364 | } | 1362 | } |
1365 | 1363 | ||
1366 | /* always update it as atm layer could not be init when we switch to | 1364 | /* 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) | |||
1496 | /* release the dsp firmware as it is not needed until | 1494 | /* release the dsp firmware as it is not needed until |
1497 | * the next failure | 1495 | * the next failure |
1498 | */ | 1496 | */ |
1499 | if (sc->dsp_firm) { | 1497 | release_firmware(sc->dsp_firm); |
1500 | release_firmware(sc->dsp_firm); | 1498 | sc->dsp_firm = NULL; |
1501 | sc->dsp_firm = NULL; | ||
1502 | } | ||
1503 | } | 1499 | } |
1504 | 1500 | ||
1505 | /* always update it as atm layer could not be init when we switch to | 1501 | /* 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) | |||
2240 | /* flush the work item, when no one can schedule it */ | 2236 | /* flush the work item, when no one can schedule it */ |
2241 | flush_work_sync(&sc->task); | 2237 | flush_work_sync(&sc->task); |
2242 | 2238 | ||
2243 | if (sc->dsp_firm) | 2239 | release_firmware(sc->dsp_firm); |
2244 | release_firmware(sc->dsp_firm); | ||
2245 | uea_leaves(INS_TO_USBDEV(sc)); | 2240 | uea_leaves(INS_TO_USBDEV(sc)); |
2246 | } | 2241 | } |
2247 | 2242 | ||