lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 17 Nov 2013 15:20:19 -0300
From:	"Geyslan G. Bem" <geyslan@...il.com>
To:	geyslan@...il.com
Cc:	Viresh Kumar <viresh.linux@...il.com>, Chris Ball <cjb@...top.org>,
	spear-devel@...t.st.com (open list:SECURE DIGITAL HO...),
	linux-mmc@...r.kernel.org (open list:SECURE DIGITAL HO...),
	linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] mmc: sdhci-spear: fix possible null dereference

Put the 'pdata->card_int_gpio' assignment in inner scope, avoiding
explicit null dereference.

Signed-off-by: Geyslan G. Bem <geyslan@...il.com>
---
 drivers/mmc/host/sdhci-spear.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 2dba9f8..c6e5d16 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -88,10 +88,9 @@ static struct sdhci_plat_data *sdhci_probe_config_dt(struct platform_device *pde
 			dev_err(&pdev->dev, "DT: kzalloc failed\n");
 			return ERR_PTR(-ENOMEM);
 		}
+		pdata->card_int_gpio = cd_gpio;
 	}
 
-	pdata->card_int_gpio = cd_gpio;
-
 	return pdata;
 }
 #else
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ