Skip to content

Commit 5919a43

Browse files
Oliver Neukumgregkh
authored andcommitted
USB: missing error check in emi62
the emi62 also lacks an error check. Signed-off-by: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent cf4cf0b commit 5919a43

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/misc/emi62.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ static int emi62_load_firmware (struct usb_device *dev)
123123

124124
/* De-assert reset (let the CPU run) */
125125
err = emi62_set_reset(dev,0);
126+
if (err < 0) {
127+
err("%s - error loading firmware: error = %d", __FUNCTION__, err);
128+
goto wraperr;
129+
}
126130
msleep(250); /* let device settle */
127131

128132
/* 2. We upload the FPGA firmware into the EMI

0 commit comments

Comments
 (0)