]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
altera-stapl: remove the unreached switch case
authorKaixu Xia <kaixuxia@tencent.com>
Fri, 13 Nov 2020 16:14:31 +0000 (00:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2020 18:53:03 +0000 (19:53 +0100)
The value of the variable status must be one of the 0, -EIO and -EILSEQ, so
the switch case -ENODATA is unreached. Remove it.

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Link: https://lore.kernel.org/r/1605284071-6901-1-git-send-email-kaixuxia@tencent.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/altera-stapl/altera.c

index 5bdf574723144c8952e6b2cd0e83207e8b5ac45e..92c0611034b0183dcb1d22ac3f14b25ec39ccf9b 100644 (file)
@@ -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__);