Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 533726f7 authored by Markus Elfring's avatar Markus Elfring Committed by Greg Kroah-Hartman
Browse files

ueagle-atm: Delete unnecessary checks before the function call "release_firmware"



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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 28ed2075
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -952,7 +952,7 @@ static void uea_load_page_e1(struct work_struct *work)
	int i;
	int i;


	/* reload firmware when reboot start and it's loaded already */
	/* 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);
		release_firmware(sc->dsp_firm);
		sc->dsp_firm = NULL;
		sc->dsp_firm = NULL;
	}
	}
@@ -1074,7 +1074,7 @@ static void uea_load_page_e4(struct work_struct *work)
	uea_dbg(INS_TO_USBDEV(sc), "sending DSP page %u\n", pageno);
	uea_dbg(INS_TO_USBDEV(sc), "sending DSP page %u\n", pageno);


	/* reload firmware when reboot start and it's loaded already */
	/* reload firmware when reboot start and it's loaded already */
	if (pageno == 0 && sc->dsp_firm) {
	if (pageno == 0) {
		release_firmware(sc->dsp_firm);
		release_firmware(sc->dsp_firm);
		sc->dsp_firm = NULL;
		sc->dsp_firm = NULL;
	}
	}