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:	Mon, 1 Oct 2012 18:20:45 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Andrey Smirnov <andrey.smirnov@...vergeddevices.net>
Cc:	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] Add a core driver for SI476x MFD

On Thu, Sep 13, 2012 at 03:40:11PM -0700, Andrey Smirnov wrote:

> +	core = kzalloc(sizeof(*core), GFP_KERNEL);

devm_kzalloc()

> +	if (!core) {
> +		pr_err("si476x-core: failed to allocate " \
> +		       "'struct si476x_core'\n");
> +		return -ENOMEM;
> +	}

Splitting error messages over multiple lines like this just makes things
hard to grep for.

> +	core->supplies.vio1 = regulator_get(&client->dev, "vio1");
> +	if (IS_ERR_OR_NULL(core->supplies.vio1)) {
> +		dev_info(&client->dev, "No vio1 regulator found\n");
> +		core->supplies.vio1 = NULL;
> +	}

This and all the usages of the regulator API in the driver are broken,
the driver should treat failures to get the supplies as errors.  There
are more than enough ways to stub things out in the core.
--
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