Skip to contentSkip to conversation

altera-stapl: remove the unreached switch case

PATCH New [email protected] 1 participant 1 message Nov 13, 2020 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 altera-stapl: remove the unreached switch case

From: Kaixu Xia <[email protected]>

The value of the variable status must be one of the 0, -EIO and -EILSEQ, so the switch case -ENODATA is unreached. Remove it.

---
v2:
-leave a 'default' case in there.

 drivers/misc/altera-stapl/altera.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/misc/altera-stapl/altera.c +0 -5
index 5bdf57472314..92c0611034b0 100644
@@ -2265,11 +2265,6 @@ static int altera_check_crc(u8 *p, s32 program_size)
 				"actual %04x\n", __func__, local_expected,
 				local_actual);
 			break;
-		case -ENODATA:
-			printk(KERN_ERR "%s: expected CRC not found, "
-				"actual CRC = %04x\n", __func__,
-				local_actual);
-			break;
 		case -EIO:
 			printk(KERN_ERR "%s: error: format isn't "
 				"recognized.\n", __func__);
Signature · 1 line
2.20.0