]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-cli: cmbloc code cleanup
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Sun, 12 May 2019 18:58:15 +0000 (11:58 -0700)
committerKeith Busch <keith.busch@intel.com>
Tue, 14 May 2019 21:45:04 +0000 (15:45 -0600)
This patch removes the unnecessary else condition which is out of
format anyway.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
nvme-print.c

index c038355bd289453e8e2a0744b6dfb11182e061ab..d9512c8e3b57631babb32ebe9fbe528d9f215bc7 100644 (file)
@@ -3031,12 +3031,11 @@ static void show_registers_cmbloc(__u32 cmbloc, __u32 cmbsz)
 {
        if (cmbsz == 0) {
                printf("\tController Memory Buffer feature is not supported\n\n");
+               return;
        }
-       else {
-               printf("\tOffset                 (OFST): %x (See cmbsz.szu for granularity)\n",
+       printf("\tOffset                 (OFST): %x (See cmbsz.szu for granularity)\n",
                        (cmbloc & 0xfffff000) >> 12);
-               printf("\tBase Indicator Register (BIR): %x\n\n", cmbloc & 0x00000007 );
-       }
+       printf("\tBase Indicator Register (BIR): %x\n\n", cmbloc & 0x00000007 );
 }
 
 static const char *nvme_register_szu_to_string(__u8 szu)