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]
Message-ID: <1389319550-12238-1-git-send-email-Li.Xiubo@freescale.com>
Date:	Fri, 10 Jan 2014 10:05:50 +0800
From:	Xiubo Li <Li.Xiubo@...escale.com>
To:	<broonie@...nel.org>, <lgirdwood@...il.com>
CC:	<alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org>,
	Xiubo Li <Li.Xiubo@...escale.com>
Subject: [PATCH] ASoC: fsl-sai: Add device tree nodes and its availiable check

SAIs that are not connected on the board should have a
status = "disabled" property in their device tree nodes.

Signed-off-by: Xiubo Li <Li.Xiubo@...escale.com>
---
 sound/soc/fsl/fsl_sai.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index cdd3fa8..6b2ab91 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -404,6 +404,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
 	struct resource *res;
 	int ret;
 
+	if (!np || !of_device_is_available(np))
+		return -ENODEV;
+
 	sai = devm_kzalloc(&pdev->dev, sizeof(*sai), GFP_KERNEL);
 	if (!sai)
 		return -ENOMEM;
-- 
1.8.4


--
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