linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Andrey Smirnov <andrey.smirnov@convergeddevices.net>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] Add a core driver for SI476x MFD
Date: Mon, 1 Oct 2012 18:20:45 +0100	[thread overview]
Message-ID: <20121001172044.GA25335@sirena.org.uk> (raw)
In-Reply-To: <1347576013-28832-2-git-send-email-andrey.smirnov@convergeddevices.net>

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.

  parent reply	other threads:[~2012-10-01 17:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13 22:40 [PATCH 0/3] A driver for Si476x series of chips Andrey Smirnov
2012-09-13 22:40 ` [PATCH 1/3] Add a core driver for SI476x MFD Andrey Smirnov
2012-09-14  6:44   ` Hans Verkuil
2012-09-21  1:05     ` andrey.smirnov
2012-09-21  7:31       ` Hans Verkuil
2012-09-21 16:33         ` andrey.smirnov
2012-09-21 16:46           ` Hans Verkuil
2012-10-01 17:20   ` Mark Brown [this message]
2012-09-13 22:40 ` [PATCH 2/3] Add a V4L2 driver for SI476X MFD Andrey Smirnov
2012-09-14  7:17   ` Hans Verkuil
2012-09-13 22:40 ` [PATCH 3/3] Add a codec " Andrey Smirnov
2012-10-01 17:29   ` Mark Brown
2012-09-25 11:39 ` [PATCH 0/3] A driver for Si476x series of chips Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121001172044.GA25335@sirena.org.uk \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=andrey.smirnov@convergeddevices.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).