Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756850Ab0BKTUz (ORCPT ); Thu, 11 Feb 2010 14:20:55 -0500 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:51083 "EHLO opensource2.wolfsonmicro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756706Ab0BKTUy (ORCPT ); Thu, 11 Feb 2010 14:20:54 -0500 From: Mark Brown To: Liam Girdwood Cc: linux-kernel@vger.kernel.org, Mark Brown , stable@kernel.org Subject: [PATCH 2.6.33] regulator: Fix display of null constraints for regulators Date: Thu, 11 Feb 2010 19:20:48 +0000 Message-Id: <1265916048-9596-1-git-send-email-broonie@opensource.wolfsonmicro.com> X-Mailer: git-send-email 1.6.6.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1257 Lines: 36 If the regulator constraints are empty and there is no voltage reported then nothing will be added to the text displayed for the constraints, leading to random stack data being printed. This is unlikely to happen for practical regulators since most will at least report a voltage but should still be fixed. Signed-off-by: Mark Brown Cc: stable@kernel.org --- Not super critical for 2.6.33 but at least worth considering. drivers/regulator/core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 0bbf8e2..ce877e8 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -664,7 +664,7 @@ static int suspend_prepare(struct regulator_dev *rdev, suspend_state_t state) static void print_constraints(struct regulator_dev *rdev) { struct regulation_constraints *constraints = rdev->constraints; - char buf[80]; + char buf[80] = ""; int count = 0; int ret; -- 1.6.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/