Skip to contentSkip to conversation

ibft: add a missing break statement

PATCH In review Dan Carpenter 2 participants 2 messages Jan 11, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ibft: add a missing break statement

The code works the same with or without the break. It just looks a bit cleaner to not fall through.

drivers/firmware/iscsi_ibft.c +1 -0
index 3ee852c..c4b187c 100644
@@ -503,6 +503,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;
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Dan Carpenter

The code works the same with or without the break. It just looks a bit cleaner to not fall through.

Yeah, you're clearly right.

For those reading this, so you don't have to go check yourselves, the line after the end of this diff is also a break; there's no further code in that case.

Quoted 1 line
Quoted 13 lines
drivers/firmware/iscsi_ibft.c +1 -0
index 3ee852c..c4b187c 100644
@@ -503,6 +503,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;
Signature · 1 line
        Peter