[PATCH v2] scsi: be_iscsi: fix possible memory leak

2013-11-18 Thread Geyslan G. Bem
This patch fix memory leakage in cases 'ISCSI_NET_PARAM_VLAN_ID' and 'ISCSI_NET_PARAM_VLAN_PRIORITY'. Note: 'if_info' will be allocated only when 'mgmt_get_if_info()' returns NULL. Signed-off-by: Geyslan G. Bem --- drivers/scsi/be2iscsi/be_iscsi.c |

[PATCH] scsi: be_iscsi: fix possible memory leak and refactor code

2013-11-17 Thread Geyslan G. Bem
This patch fix memory leakage in cases 'ISCSI_NET_PARAM_VLAN_ID' and 'ISCSI_NET_PARAM_VLAN_PRIORITY' and refactors code 'going out' when necessary. Signed-off-by: Geyslan G. Bem --- drivers/scsi/be2iscsi/be_iscsi.c | 41 +---

[PATCH] drivers: scsi: lpfc: Remove useless casting in lpfc_init.c

2013-10-16 Thread Geyslan G. Bem
Casting (void *) value returned by kzalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- drivers/scsi/lpfc/lpfc_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc

[PATCH] drivers: scsi: Remove useless casting in hpsa.c

2013-10-16 Thread Geyslan G. Bem
Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- drivers/scsi/hpsa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 891c86b..896a57d