aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/config_roms.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-11 17:50:13 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-04-29 18:00:28 -0400
commit64ff712321875c2457d3a77d3fc4ab4989f7a8c0 (patch)
tree05fa3dc1110fdecc90daa27bbf67311f0d530aba /drivers/ieee1394/config_roms.c
parent982610bd0d8e64baff36099f6dc456ea52d22257 (diff)
ieee1394: stricter error checks in csr1212
return -EINVAL becomes BUG_ON in checks of function call parameters. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/config_roms.c')
-rw-r--r--drivers/ieee1394/config_roms.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ieee1394/config_roms.c b/drivers/ieee1394/config_roms.c
index 6a87a2700c9d..556658a1db29 100644
--- a/drivers/ieee1394/config_roms.c
+++ b/drivers/ieee1394/config_roms.c
@@ -63,9 +63,9 @@ int hpsb_default_host_entry(struct hpsb_host *host)
63 return -ENOMEM; 63 return -ENOMEM;
64 } 64 }
65 65
66 ret = csr1212_associate_keyval(vend_id, text); 66 csr1212_associate_keyval(vend_id, text);
67 csr1212_release_keyval(text); 67 csr1212_release_keyval(text);
68 ret |= csr1212_attach_keyval_to_directory(root, vend_id); 68 ret = csr1212_attach_keyval_to_directory(root, vend_id);
69 csr1212_release_keyval(vend_id); 69 csr1212_release_keyval(vend_id);
70 if (ret != CSR1212_SUCCESS) { 70 if (ret != CSR1212_SUCCESS) {
71 csr1212_destroy_csr(host->csr.rom); 71 csr1212_destroy_csr(host->csr.rom);
@@ -103,10 +103,12 @@ static int config_rom_ip1394_init(void)
103 if (!ip1394_ud || !spec_id || !spec_desc || !ver || !ver_desc) 103 if (!ip1394_ud || !spec_id || !spec_desc || !ver || !ver_desc)
104 goto ip1394_fail; 104 goto ip1394_fail;
105 105
106 if (csr1212_associate_keyval(spec_id, spec_desc) == CSR1212_SUCCESS && 106 csr1212_associate_keyval(spec_id, spec_desc);
107 csr1212_associate_keyval(ver, ver_desc) == CSR1212_SUCCESS && 107 csr1212_associate_keyval(ver, ver_desc);
108 csr1212_attach_keyval_to_directory(ip1394_ud, spec_id) == CSR1212_SUCCESS && 108 if (csr1212_attach_keyval_to_directory(ip1394_ud, spec_id)
109 csr1212_attach_keyval_to_directory(ip1394_ud, ver) == CSR1212_SUCCESS) 109 == CSR1212_SUCCESS &&
110 csr1212_attach_keyval_to_directory(ip1394_ud, ver)
111 == CSR1212_SUCCESS)
110 ret = 0; 112 ret = 0;
111 113
112ip1394_fail: 114ip1394_fail: