amlogic: mmc: Fix null check
authorStricted <info@stricted.net>
Sat, 19 Jun 2021 23:10:46 +0000 (23:10 +0000)
committerNolen Johnson <johnsonnolen@gmail.com>
Sat, 3 Jul 2021 01:04:57 +0000 (21:04 -0400)
Change-Id: I08b33f1971b753cd443ac2006c08642414cee5fb

drivers/amlogic/mmc/emmc_partitions.c

index ead579f276d4f7c850b5cc8eee8a8f8779f50e3f..7150dd1e6f8febef28715c892228091ae40d0b39 100644 (file)
@@ -973,7 +973,7 @@ static int mmc_read_partition_tbl(struct mmc_card *card,
                                        sizeof(pt_fmt->magic)) != 0) {
 
                        pr_info("magic error: %s\n",
-                                       (pt_fmt->magic)?pt_fmt->magic:"NULL");
+                                       (pt_fmt->magic != NULL)?pt_fmt->magic:"NULL");
 
                } else if ((pt_fmt->part_num < 0)
                                || (pt_fmt->part_num > MAX_MMC_PART_NUM)) {