@@ -3420,6 +3420,8 @@ static int qla4xxx_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
34203420 task_data -> data_dma = dma_map_single (& ha -> pdev -> dev , task -> data ,
34213421 task -> data_count ,
34223422 DMA_TO_DEVICE );
3423+ if (dma_mapping_error (& ha -> pdev -> dev , task_data -> data_dma ))
3424+ return - ENOMEM ;
34233425 }
34243426
34253427 DEBUG2 (ql4_printk (KERN_INFO , ha , "%s: MaxRecvLen %u, iscsi hrd %d\n" ,
@@ -4102,7 +4104,7 @@ void qla4xxx_srb_compl(struct kref *ref)
41024104 * The mid-level driver tries to ensure that queuecommand never gets
41034105 * invoked concurrently with itself or the interrupt handler (although
41044106 * the interrupt handler may call this routine as part of request-
4105- * completion handling). Unfortunely , it sometimes calls the scheduler
4107+ * completion handling). Unfortunately , it sometimes calls the scheduler
41064108 * in interrupt context which is a big NO! NO!.
41074109 **/
41084110static int qla4xxx_queuecommand (struct Scsi_Host * host , struct scsi_cmnd * cmd )
@@ -4645,7 +4647,7 @@ static int qla4xxx_cmd_wait(struct scsi_qla_host *ha)
46454647 cmd = scsi_host_find_tag (ha -> host , index );
46464648 /*
46474649 * We cannot just check if the index is valid,
4648- * becase if we are run from the scsi eh, then
4650+ * because if we are run from the scsi eh, then
46494651 * the scsi/block layer is going to prevent
46504652 * the tag from being released.
46514653 */
@@ -4950,7 +4952,7 @@ static int qla4xxx_recover_adapter(struct scsi_qla_host *ha)
49504952 /* Upon successful firmware/chip reset, re-initialize the adapter */
49514953 if (status == QLA_SUCCESS ) {
49524954 /* For ISP-4xxx, force function 1 to always initialize
4953- * before function 3 to prevent both funcions from
4955+ * before function 3 to prevent both functions from
49544956 * stepping on top of the other */
49554957 if (is_qla40XX (ha ) && (ha -> mac_index == 3 ))
49564958 ssleep (6 );
@@ -6604,6 +6606,8 @@ static struct iscsi_endpoint *qla4xxx_get_ep_fwdb(struct scsi_qla_host *ha,
66046606
66056607 ep = qla4xxx_ep_connect (ha -> host , (struct sockaddr * )dst_addr , 0 );
66066608 vfree (dst_addr );
6609+ if (IS_ERR (ep ))
6610+ return NULL ;
66076611 return ep ;
66086612}
66096613
@@ -6910,7 +6914,7 @@ static int qla4xxx_sess_conn_setup(struct scsi_qla_host *ha,
69106914 struct ddb_entry * ddb_entry = NULL ;
69116915
69126916 /* Create session object, with INVALID_ENTRY,
6913- * the targer_id would get set when we issue the login
6917+ * the target_id would get set when we issue the login
69146918 */
69156919 cls_sess = iscsi_session_setup (& qla4xxx_iscsi_transport , ha -> host ,
69166920 cmds_max , sizeof (struct ddb_entry ),
0 commit comments