* [PATCH] target: initialize sense_reason_t ret in core_scsi3_emulate_pro_register()
@ 2012-12-22 21:15 Geert Uytterhoeven
2013-01-09 1:51 ` Nicholas A. Bellinger
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2012-12-22 21:15 UTC (permalink / raw)
To: Christoph Hellwig, Nicholas A. Bellinger
Cc: linux-scsi, target-devel, linux-kernel, Geert Uytterhoeven
drivers/target/target_core_pr.c: In function ‘core_scsi3_emulate_pro_register’:
drivers/target/target_core_pr.c:2056: warning: ‘ret’ may be used uninitialized in this function
If !spec_i_pt, the "goto out_put_pr_reg" on line 2141 seems to be a real
case where ret is not initialized.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/target/target_core_pr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index e35dbf8..c2e8026 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -2053,7 +2053,7 @@ core_scsi3_emulate_pro_register(struct se_cmd *cmd, u64 res_key, u64 sa_res_key,
/* Used for APTPL metadata w/ UNREGISTER */
unsigned char *pr_aptpl_buf = NULL;
unsigned char isid_buf[PR_REG_ISID_LEN], *isid_ptr = NULL;
- sense_reason_t ret;
+ sense_reason_t ret = 0;
int pr_holder = 0, type;
if (!se_sess || !se_lun) {
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] target: initialize sense_reason_t ret in core_scsi3_emulate_pro_register()
2012-12-22 21:15 [PATCH] target: initialize sense_reason_t ret in core_scsi3_emulate_pro_register() Geert Uytterhoeven
@ 2013-01-09 1:51 ` Nicholas A. Bellinger
0 siblings, 0 replies; 2+ messages in thread
From: Nicholas A. Bellinger @ 2013-01-09 1:51 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Christoph Hellwig, linux-scsi, target-devel, linux-kernel,
Hannes Reinecke
Hi Geert,
Apologies for the delay on this one. Still catching up on some older
holiday items..
On Sat, 2012-12-22 at 22:15 +0100, Geert Uytterhoeven wrote:
> drivers/target/target_core_pr.c: In function ‘core_scsi3_emulate_pro_register’:
> drivers/target/target_core_pr.c:2056: warning: ‘ret’ may be used uninitialized in this function
>
> If !spec_i_pt, the "goto out_put_pr_reg" on line 2141 seems to be a real
> case where ret is not initialized.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> drivers/target/target_core_pr.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
> index e35dbf8..c2e8026 100644
> --- a/drivers/target/target_core_pr.c
> +++ b/drivers/target/target_core_pr.c
> @@ -2053,7 +2053,7 @@ core_scsi3_emulate_pro_register(struct se_cmd *cmd, u64 res_key, u64 sa_res_key,
> /* Used for APTPL metadata w/ UNREGISTER */
> unsigned char *pr_aptpl_buf = NULL;
> unsigned char isid_buf[PR_REG_ISID_LEN], *isid_ptr = NULL;
> - sense_reason_t ret;
> + sense_reason_t ret = 0;
> int pr_holder = 0, type;
>
> if (!se_sess || !se_lun) {
Looks fine, applied to target-pending/master.
Thank you,
--nab
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-09 1:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-22 21:15 [PATCH] target: initialize sense_reason_t ret in core_scsi3_emulate_pro_register() Geert Uytterhoeven
2013-01-09 1:51 ` Nicholas A. Bellinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).