linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iscsi_ibft: Fix missing break in switch statement
@ 2019-02-11 18:43 Gustavo A. R. Silva
  2019-02-12 18:46 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-11 18:43 UTC (permalink / raw)
  To: Peter Jones, Konrad Rzeszutek Wilk
  Cc: linux-kernel, Gustavo A. R. Silva, Kees Cook

Add missing break statement in order to prevent the code from falling
through to case ISCSI_BOOT_TGT_NAME, which is unnecessary.

This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.

Fixes: b33a84a38477 ("ibft: convert iscsi_ibft module to iscsi boot lib")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/firmware/iscsi_ibft.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index 6bc8e6640d71..c51462f5aa1e 100644
--- a/drivers/firmware/iscsi_ibft.c
+++ b/drivers/firmware/iscsi_ibft.c
@@ -542,6 +542,7 @@ static umode_t __init ibft_check_tgt_for(void *data, int type)
 	case ISCSI_BOOT_TGT_NIC_ASSOC:
 	case ISCSI_BOOT_TGT_CHAP_TYPE:
 		rc = S_IRUGO;
+		break;
 	case ISCSI_BOOT_TGT_NAME:
 		if (tgt->tgt_name_len)
 			rc = S_IRUGO;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iscsi_ibft: Fix missing break in switch statement
  2019-02-11 18:43 [PATCH] iscsi_ibft: Fix missing break in switch statement Gustavo A. R. Silva
@ 2019-02-12 18:46 ` Konrad Rzeszutek Wilk
  2019-02-12 18:49   ` Gustavo A. R. Silva
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2019-02-12 18:46 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Peter Jones, Konrad Rzeszutek Wilk, linux-kernel, Kees Cook

On Mon, Feb 11, 2019 at 12:43:23PM -0600, Gustavo A. R. Silva wrote:
> Add missing break statement in order to prevent the code from falling
> through to case ISCSI_BOOT_TGT_NAME, which is unnecessary.
> 
> This bug was found thanks to the ongoing efforts to enable
> -Wimplicit-fallthrough.
> 
> Fixes: b33a84a38477 ("ibft: convert iscsi_ibft module to iscsi boot lib")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>


Queued it up in https://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft.git
> ---
>  drivers/firmware/iscsi_ibft.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
> index 6bc8e6640d71..c51462f5aa1e 100644
> --- a/drivers/firmware/iscsi_ibft.c
> +++ b/drivers/firmware/iscsi_ibft.c
> @@ -542,6 +542,7 @@ static umode_t __init ibft_check_tgt_for(void *data, int type)
>  	case ISCSI_BOOT_TGT_NIC_ASSOC:
>  	case ISCSI_BOOT_TGT_CHAP_TYPE:
>  		rc = S_IRUGO;
> +		break;
>  	case ISCSI_BOOT_TGT_NAME:
>  		if (tgt->tgt_name_len)
>  			rc = S_IRUGO;
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iscsi_ibft: Fix missing break in switch statement
  2019-02-12 18:46 ` Konrad Rzeszutek Wilk
@ 2019-02-12 18:49   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-12 18:49 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: Peter Jones, Konrad Rzeszutek Wilk, linux-kernel, Kees Cook



On 2/12/19 12:46 PM, Konrad Rzeszutek Wilk wrote:
> On Mon, Feb 11, 2019 at 12:43:23PM -0600, Gustavo A. R. Silva wrote:
>> Add missing break statement in order to prevent the code from falling
>> through to case ISCSI_BOOT_TGT_NAME, which is unnecessary.
>>
>> This bug was found thanks to the ongoing efforts to enable
>> -Wimplicit-fallthrough.
>>
>> Fixes: b33a84a38477 ("ibft: convert iscsi_ibft module to iscsi boot lib")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> 
> 
> Queued it up in https://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft.git

Great.

Thanks, Konrad.
--
Gustavo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-12 18:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 18:43 [PATCH] iscsi_ibft: Fix missing break in switch statement Gustavo A. R. Silva
2019-02-12 18:46 ` Konrad Rzeszutek Wilk
2019-02-12 18:49   ` Gustavo A. R. Silva

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).