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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E8EC517.2050006@linaro.org>
Date:	Fri, 07 Oct 2011 17:23:35 +0800
From:	"Ying-Chun Liu (PaulLiu)" <paul.liu@...aro.org>
To:	ashish.jangam@...tcummins.com
CC:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Dajun <dajun.chen@...semi.com>, linaro-dev@...ts.linaro.org,
	linux-kernel@...r.kernel.org, lrg@...mlogic.co.uk
Subject: Re: [Patch 5/11] Regulator: DA9052 regulator support v3

(2011年07月06日 18:36), ashishj3 wrote:
> +static int __devinit da9052_regulator_probe(struct platform_device *pdev)
> +{
> +	struct da9052_regulator *regulator;
> +	struct da9052 *da9052;
> +	struct da9052_pdata *pdata;
> +	int ret;
> +
> +	regulator = kzalloc(sizeof(struct da9052_regulator), GFP_KERNEL);
> +	if (!regulator)
> +		return -ENOMEM;
> +
> +	da9052 = dev_get_drvdata(pdev->dev.parent);
> +	pdata = da9052->dev->platform_data;
> +
> +	regulator->info = find_regulator_info(pdev->id);
> +	if (regulator->info == NULL) {
> +		dev_err(&pdev->dev, "invalid regulator ID specified\n");
> +		ret = -EINVAL;
> +		goto err;
> +	}
> +
> +	regulator->rdev = regulator_register(&regulator->info->reg_desc,
> +					     &pdev->dev,
> +					     pdata->regulators[pdev->id],
> +					     regulator);
> +	if (IS_ERR(regulator->rdev)) {
> +		dev_err(&pdev->dev, "failed to register regulator %s\n",
> +			regulator->info->reg_desc.name);
> +		ret = PTR_ERR(regulator->rdev);
> +		goto err;
> +	}
> +
> +	platform_set_drvdata(pdev, regulator);
> +
> +	return 0;
> +err:
> +	kfree(regulator);
> +	return ret;
> +}

Hi Ashish,

It seems to me that in this function, regulator->da9052 isn't initialized.

Regards,
Paul
--
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