container_of(work, struct rdac_controller, ms_work);
        struct scsi_device *sdev = ctlr->ms_sdev;
        struct rdac_dh_data *h = sdev->handler_data;
-       int err = SCSI_DH_OK, retry_cnt = RDAC_RETRY_COUNT;
+       int err, retry_cnt = RDAC_RETRY_COUNT;
        struct rdac_queue_data *tmp, *qdata;
        LIST_HEAD(list);
        unsigned char cdb[MAX_COMMAND_SIZE];
                (char *) h->ctlr->array_name, h->ctlr->index,
                (retry_cnt == RDAC_RETRY_COUNT) ? "queueing" : "retrying");
 
-       if (scsi_execute_cmd(sdev, cdb, opf, &h->ctlr->mode_select, data_size,
-                            RDAC_TIMEOUT * HZ, RDAC_RETRIES, &exec_args)) {
+       if (!scsi_execute_cmd(sdev, cdb, opf, &h->ctlr->mode_select, data_size,
+                             RDAC_TIMEOUT * HZ, RDAC_RETRIES, &exec_args)) {
+               h->state = RDAC_STATE_ACTIVE;
+               RDAC_LOG(RDAC_LOG_FAILOVER, sdev, "array %s, ctlr %d, "
+                               "MODE_SELECT completed",
+                               (char *) h->ctlr->array_name, h->ctlr->index);
+               err = SCSI_DH_OK;
+       } else {
                err = mode_select_handle_sense(sdev, &sshdr);
                if (err == SCSI_DH_RETRY && retry_cnt--)
                        goto retry;
                if (err == SCSI_DH_IMM_RETRY)
                        goto retry;
        }
-       if (err == SCSI_DH_OK) {
-               h->state = RDAC_STATE_ACTIVE;
-               RDAC_LOG(RDAC_LOG_FAILOVER, sdev, "array %s, ctlr %d, "
-                               "MODE_SELECT completed",
-                               (char *) h->ctlr->array_name, h->ctlr->index);
-       }
 
        list_for_each_entry_safe(qdata, tmp, &list, entry) {
                list_del(&qdata->entry);