Commit 7442511ca141c67a20e85dec34b206cb413479d7
1 parent
856ae5c3
Don't try to return result from a void function (spotted by Sparse)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7017 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
5 changed files
with
24 additions
and
16 deletions
hw/bt-hci.c
... | ... | @@ -564,9 +564,11 @@ static void bt_hci_inquiry_result(struct bt_hci_s *hci, |
564 | 564 | |
565 | 565 | switch (hci->lm.inquiry_mode) { |
566 | 566 | case 0x00: |
567 | - return bt_hci_inquiry_result_standard(hci, slave); | |
567 | + bt_hci_inquiry_result_standard(hci, slave); | |
568 | + return; | |
568 | 569 | case 0x01: |
569 | - return bt_hci_inquiry_result_with_rssi(hci, slave); | |
570 | + bt_hci_inquiry_result_with_rssi(hci, slave); | |
571 | + return; | |
570 | 572 | default: |
571 | 573 | fprintf(stderr, "%s: bad inquiry mode %02x\n", __FUNCTION__, |
572 | 574 | hci->lm.inquiry_mode); |
... | ... | @@ -771,9 +773,11 @@ static void bt_hci_lmp_connection_request(struct bt_link_s *link) |
771 | 773 | struct bt_hci_s *hci = hci_from_device(link->slave); |
772 | 774 | evt_conn_request params; |
773 | 775 | |
774 | - if (hci->conn_req_host) | |
775 | - return bt_hci_connection_reject(hci, link->host, | |
776 | - HCI_REJECTED_LIMITED_RESOURCES); | |
776 | + if (hci->conn_req_host) { | |
777 | + bt_hci_connection_reject(hci, link->host, | |
778 | + HCI_REJECTED_LIMITED_RESOURCES); | |
779 | + return; | |
780 | + } | |
777 | 781 | hci->conn_req_host = link->host; |
778 | 782 | /* TODO: if masked and auto-accept, then auto-accept, |
779 | 783 | * if masked and not auto-accept, then auto-reject */ |
... | ... | @@ -2125,7 +2129,7 @@ static void bt_hci_evt_submit(void *opaque, int len) |
2125 | 2129 | /* TODO: notify upper layer */ |
2126 | 2130 | struct bt_hci_s *s = opaque; |
2127 | 2131 | |
2128 | - return s->info.evt_recv(s->info.opaque, s->evt_buf, len); | |
2132 | + s->info.evt_recv(s->info.opaque, s->evt_buf, len); | |
2129 | 2133 | } |
2130 | 2134 | |
2131 | 2135 | static int bt_hci_bdaddr_set(struct HCIInfo *info, const uint8_t *bd_addr) |
... | ... | @@ -2141,7 +2145,7 @@ static void bt_hci_destroy(struct bt_device_s *dev) |
2141 | 2145 | { |
2142 | 2146 | struct bt_hci_s *hci = hci_from_device(dev); |
2143 | 2147 | |
2144 | - return bt_hci_done(&hci->info); | |
2148 | + bt_hci_done(&hci->info); | |
2145 | 2149 | } |
2146 | 2150 | |
2147 | 2151 | struct HCIInfo *bt_new_hci(struct bt_scatternet_s *net) |
... | ... | @@ -2196,9 +2200,11 @@ static void bt_hci_done(struct HCIInfo *info) |
2196 | 2200 | /* Be gentle and send DISCONNECT to all connected peers and those |
2197 | 2201 | * currently waiting for us to accept or reject a connection request. |
2198 | 2202 | * This frees the links. */ |
2199 | - if (hci->conn_req_host) | |
2200 | - return bt_hci_connection_reject(hci, | |
2201 | - hci->conn_req_host, HCI_OE_POWER_OFF); | |
2203 | + if (hci->conn_req_host) { | |
2204 | + bt_hci_connection_reject(hci, | |
2205 | + hci->conn_req_host, HCI_OE_POWER_OFF); | |
2206 | + return; | |
2207 | + } | |
2202 | 2208 | |
2203 | 2209 | for (handle = HCI_HANDLE_OFFSET; |
2204 | 2210 | handle < (HCI_HANDLE_OFFSET | HCI_HANDLES_MAX); handle ++) | ... | ... |
hw/bt-hid.c
... | ... | @@ -383,7 +383,7 @@ static void bt_hid_control_sdu(void *opaque, const uint8_t *data, int len) |
383 | 383 | { |
384 | 384 | struct bt_hid_device_s *hid = opaque; |
385 | 385 | |
386 | - return bt_hid_control_transaction(hid, data, len); | |
386 | + bt_hid_control_transaction(hid, data, len); | |
387 | 387 | } |
388 | 388 | |
389 | 389 | static void bt_hid_datain(void *opaque) | ... | ... |
hw/fw_cfg.c
... | ... | @@ -108,7 +108,7 @@ static uint32_t fw_cfg_io_readb(void *opaque, uint32_t addr) |
108 | 108 | |
109 | 109 | static void fw_cfg_io_writeb(void *opaque, uint32_t addr, uint32_t value) |
110 | 110 | { |
111 | - return fw_cfg_write(opaque, (uint8_t)value); | |
111 | + fw_cfg_write(opaque, (uint8_t)value); | |
112 | 112 | } |
113 | 113 | |
114 | 114 | static void fw_cfg_io_writew(void *opaque, uint32_t addr, uint32_t value) |
... | ... | @@ -124,7 +124,7 @@ static uint32_t fw_cfg_mem_readb(void *opaque, target_phys_addr_t addr) |
124 | 124 | static void fw_cfg_mem_writeb(void *opaque, target_phys_addr_t addr, |
125 | 125 | uint32_t value) |
126 | 126 | { |
127 | - return fw_cfg_write(opaque, (uint8_t)value); | |
127 | + fw_cfg_write(opaque, (uint8_t)value); | |
128 | 128 | } |
129 | 129 | |
130 | 130 | static void fw_cfg_mem_writew(void *opaque, target_phys_addr_t addr, | ... | ... |
hw/lm832x.c
... | ... | @@ -519,8 +519,10 @@ void lm832x_key_event(struct i2c_slave *i2c, int key, int state) |
519 | 519 | if ((s->status & INT_ERROR) && (s->error & ERR_FIFOOVR)) |
520 | 520 | return; |
521 | 521 | |
522 | - if (s->kbd.len >= sizeof(s->kbd.fifo)) | |
523 | - return lm_kbd_error(s, ERR_FIFOOVR); | |
522 | + if (s->kbd.len >= sizeof(s->kbd.fifo)) { | |
523 | + lm_kbd_error(s, ERR_FIFOOVR); | |
524 | + return; | |
525 | + } | |
524 | 526 | |
525 | 527 | s->kbd.fifo[(s->kbd.start + s->kbd.len ++) & (sizeof(s->kbd.fifo) - 1)] = |
526 | 528 | key | (state << 7); | ... | ... |
hw/wm8750.c