cmd/nfsdown: fix wrong null check for argument in do_mmc_init() 98/228498/2
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 23 Mar 2020 09:07:32 +0000 (18:07 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 24 Mar 2020 01:54:11 +0000 (10:54 +0900)
In do_mmc_init(), there is wrong null check for argument
instead of find_mmc_device() result. Fix wrong null check.

Change-Id: Ibbd2781bed7ae1a812563a5d77b2a4c46cf66523
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
cmd/nfsdown.c

index d3cde78..4122b04 100644 (file)
@@ -136,7 +136,7 @@ static int do_mmc_init(struct mmc **mmc)
        int ret;
 
        *mmc = find_mmc_device(0);
-       if (!mmc) {
+       if (!*mmc) {
                printk("Couldn't find MMC device no. 0.\n");
                return -ENODEV;
        }