Print this page
10091 smatch fixes for ahci.c

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/sata/adapters/ahci/ahci.c
          +++ new/usr/src/uts/common/io/sata/adapters/ahci/ahci.c
↓ open down ↓ 6161 lines elided ↑ open up ↑
6162 6162                  goto err_case3;
6163 6163          }
6164 6164  
6165 6165          /* Allocate the argument for the taskq */
6166 6166          ahci_portp->ahciport_event_args =
6167 6167              kmem_zalloc(sizeof (ahci_event_arg_t), KM_SLEEP);
6168 6168  
6169 6169          ahci_portp->ahciport_event_args->ahciea_addrp =
6170 6170              kmem_zalloc(sizeof (ahci_addr_t), KM_SLEEP);
6171 6171  
6172      -        if (ahci_portp->ahciport_event_args == NULL)
6173      -                goto err_case4;
6174      -
6175 6172          /* Initialize the done queue */
6176 6173          ahci_portp->ahciport_doneq = NULL;
6177 6174          ahci_portp->ahciport_doneqtail = &ahci_portp->ahciport_doneq;
6178 6175          ahci_portp->ahciport_doneq_len = 0;
6179 6176  
6180 6177          mutex_exit(&ahci_portp->ahciport_mutex);
6181 6178  
6182 6179          return (AHCI_SUCCESS);
6183 6180  
6184      -err_case4:
6185      -        ddi_taskq_destroy(ahci_portp->ahciport_event_taskq);
6186      -
6187 6181  err_case3:
6188 6182          ahci_dealloc_cmd_list(ahci_ctlp, ahci_portp);
6189 6183  
6190 6184  err_case2:
6191 6185          ahci_dealloc_rcvd_fis(ahci_portp);
6192 6186  
6193 6187  err_case1:
6194 6188          mutex_exit(&ahci_portp->ahciport_mutex);
6195 6189          mutex_destroy(&ahci_portp->ahciport_mutex);
6196 6190          cv_destroy(&ahci_portp->ahciport_cv);
↓ open down ↓ 1729 lines elided ↑ open up ↑
7926 7920                              spkt, port);
7927 7921  
7928 7922                          /*
7929 7923                           * Won't emit the error message if it is an IDENTIFY
7930 7924                           * DEVICE command sent to an ATAPI device.
7931 7925                           */
7932 7926                          if ((spkt != NULL) &&
7933 7927                              (spkt->satapkt_cmd.satacmd_cmd_reg ==
7934 7928                              SATAC_ID_DEVICE) &&
7935 7929                              (task_abort_flag == 1))
7936      -                        goto out1;
     7930 +                                goto out1;
7937 7931  
7938 7932                          /*
7939 7933                           * Won't emit the error message if it is an ATAPI PACKET
7940 7934                           * command
7941 7935                           */
7942 7936                          if ((spkt != NULL) &&
7943 7937                              (spkt->satapkt_cmd.satacmd_cmd_reg == SATAC_PACKET))
7944 7938                                  goto out1;
7945 7939  
7946 7940                  } else if (NCQ_CMD_IN_PROGRESS(ahci_portp)) {
↓ open down ↓ 2942 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX