The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
int i;
/* reload firmware when reboot start and it's loaded already */
- if (ovl == 0 && pageno == 0 && sc->dsp_firm) {
+ if (ovl == 0 && pageno == 0) {
release_firmware(sc->dsp_firm);
sc->dsp_firm = NULL;
}
uea_dbg(INS_TO_USBDEV(sc), "sending DSP page %u\n", pageno);
/* reload firmware when reboot start and it's loaded already */
- if (pageno == 0 && sc->dsp_firm) {
+ if (pageno == 0) {
release_firmware(sc->dsp_firm);
sc->dsp_firm = NULL;
}