[scsi:for-next 14/27] drivers/scsi/qla2xxx/qla_os.c:364 qla2x00_free_req_que() info: redundant null check on req->outstanding_cmds calling kfree()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
head:   e3ff197a750d2912d0bb2a0161c23c18bad250ad
commit: 99cc149bbdd78a3f18c6b366e1c239f62d59d096 [14/27] [SCSI] qla2xxx: Determine the number of outstanding commands based on available resources.


smatch warnings:

+ drivers/scsi/qla2xxx/qla_os.c:364 qla2x00_free_req_que() info: redundant null check on req->outstanding_cmds calling kfree()
  drivers/scsi/qla2xxx/qla_os.c:686 qla2xxx_queuecommand() error: potential NULL dereference 'rport'.

vim +364 drivers/scsi/qla2xxx/qla_os.c

73208dfd Anirban Chakraborty 2008-12-09  348  
73208dfd Anirban Chakraborty 2008-12-09  349  fail_rsp_map:
73208dfd Anirban Chakraborty 2008-12-09  350  	kfree(ha->req_q_map);
73208dfd Anirban Chakraborty 2008-12-09  351  	ha->req_q_map = NULL;
73208dfd Anirban Chakraborty 2008-12-09  352  fail_req_map:
73208dfd Anirban Chakraborty 2008-12-09  353  	return -ENOMEM;
73208dfd Anirban Chakraborty 2008-12-09  354  }
73208dfd Anirban Chakraborty 2008-12-09  355  
2afa19a9 Anirban Chakraborty 2009-04-06  356  static void qla2x00_free_req_que(struct qla_hw_data *ha, struct req_que *req)
73208dfd Anirban Chakraborty 2008-12-09  357  {
73208dfd Anirban Chakraborty 2008-12-09  358  	if (req && req->ring)
73208dfd Anirban Chakraborty 2008-12-09  359  		dma_free_coherent(&ha->pdev->dev,
73208dfd Anirban Chakraborty 2008-12-09  360  		(req->length + 1) * sizeof(request_t),
73208dfd Anirban Chakraborty 2008-12-09  361  		req->ring, req->dma);
73208dfd Anirban Chakraborty 2008-12-09  362  
99cc149b Chad Dupuis         2012-12-07  363  	if (req && req->outstanding_cmds)
99cc149b Chad Dupuis         2012-12-07 @364  		kfree(req->outstanding_cmds);
99cc149b Chad Dupuis         2012-12-07  365  
73208dfd Anirban Chakraborty 2008-12-09  366  	kfree(req);
73208dfd Anirban Chakraborty 2008-12-09  367  	req = NULL;
73208dfd Anirban Chakraborty 2008-12-09  368  }
73208dfd Anirban Chakraborty 2008-12-09  369  
2afa19a9 Anirban Chakraborty 2009-04-06  370  static void qla2x00_free_rsp_que(struct qla_hw_data *ha, struct rsp_que *rsp)
2afa19a9 Anirban Chakraborty 2009-04-06  371  {
2afa19a9 Anirban Chakraborty 2009-04-06  372  	if (rsp && rsp->ring)

---
0-DAY kernel build testing backend         Open Source Technology Center
Fengguang Wu, Yuanhan Liu                              Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux