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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 31 Oct 2015 16:32:30 +0800
From:	Yong Wu <yong.wu@...iatek.com>
To:	Robin Murphy <robin.murphy@....com>
CC:	Joerg Roedel <joro@...tes.org>,
	Thierry Reding <treding@...dia.com>,
	Mark Rutland <mark.rutland@....com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	Will Deacon <will.deacon@....com>,
	Daniel Kurtz <djkurtz@...gle.com>,
	Tomasz Figa <tfiga@...gle.com>,
	Lucas Stach <l.stach@...gutronix.de>,
	Rob Herring <robh+dt@...nel.org>,
	Catalin Marinas <catalin.marinas@....com>,
	<linux-mediatek@...ts.infradead.org>,
	Sasha Hauer <kernel@...gutronix.de>,
	<srv_heupstream@...iatek.com>, <devicetree@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<iommu@...ts.linux-foundation.org>, <pebolle@...cali.nl>,
	<arnd@...db.de>, <mitchelh@...eaurora.org>,
	Sricharan R <sricharan@...eaurora.org>,
	<youhua.li@...iatek.com>, <k.zhang@...iatek.com>,
	<kendrick.hsu@...iatek.com>
Subject: Re: [PATCH v5 4/6] memory: mediatek: Add SMI driver

On Tue, 2015-10-27 at 13:24 +0000, Robin Murphy wrote:
> On 09/10/15 03:23, Yong Wu wrote:
> [...]
> > +static int mtk_smi_probe(struct platform_device *pdev)
> > +{
> > +	struct device *dev = &pdev->dev;
> > +	struct mtk_smi_data *smidata;
> > +	int ret;
> > +
> > +	if (!dev->pm_domain)
> > +		return -EPROBE_DEFER;
> > +
> > +	smidata = devm_kzalloc(dev, sizeof(*smidata), GFP_KERNEL);
> > +	if (!smidata)
> > +		return -ENOMEM;
> > +
> > +	smidata->clk_apb = devm_clk_get(dev, "apb");
> > +	if (IS_ERR(smidata->clk_apb))
> > +		return PTR_ERR(smidata->clk_apb);
> > +
> > +	smidata->clk_smi = devm_clk_get(dev, "smi");
> > +	if (IS_ERR(smidata->clk_smi))
> > +		return PTR_ERR(smidata->clk_smi);
> > +
> > +	pm_runtime_enable(dev);
> > +	dev_set_drvdata(dev, smidata);
> > +	return ret;
> 
> ret is used uninitialised here, but you might as well just "return 0;" 
> and get rid of the variable entirely.

Thanks. I will change to "return 0" directly.

> 
> > +}
> 
> Robin.
> 


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