Commit 7496e053 authored by Mark Hounschell's avatar Mark Hounschell Committed by Greg Kroah-Hartman

staging: dgap: check unchecked return values

Check the return values of dgap_tty_register and
dgap_finalize_board_init. If they fail for a
particular board we should not be able to try
to use that board. IE. no device entries shall
be created for that board.
Signed-off-by: default avatarMark Hounschell <markh@compro.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cacaf104
......@@ -882,8 +882,13 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
return -EINVAL;
}
dgap_tty_register(brd);
dgap_finalize_board_init(brd);
ret = dgap_tty_register(brd);
if (ret)
return ret;
ret = dgap_finalize_board_init(brd);
if (ret)
return ret;
if (fw_info[card_type].bios_name) {
ret = request_firmware(&fw, fw_info[card_type].bios_name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment