mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [RFC][PATCH] regulator: Fix _regulator_get_voltage if get_voltage callback is NULL
Date: Thu, 19 May 2011 09:47:25 +0800	[thread overview]
Message-ID: <BANLkTimU7FyuTuVw1ezOo381a798Ec+uCw@mail.gmail.com> (raw)
In-Reply-To: <20110518163205.GC16414@opensource.wolfsonmicro.com>

2011/5/19 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Wed, May 18, 2011 at 09:01:58PM +0800, Axel Lin wrote:
>
>> @@ -1886,13 +1886,15 @@ static int _regulator_get_voltage(struct regulator_dev *rdev)
>>               if (sel < 0)
>>                       return sel;
>>               ret = rdev->desc->ops->list_voltage(rdev, sel);
>> +             goto out;
>>       }
>
> Why are you adding this goto?  It's not going to change anything...
>
no matter what ret value returns from rdev->desc->ops->list_voltage(rdev, sel);

In the case of rdev->desc->ops->get_voltage is NULL,
current implementation will always return -EINVAL;

Regards,
Axel

  reply	other threads:[~2011-05-19  1:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 13:01 Axel Lin
2011-05-18 16:32 ` Mark Brown
2011-05-19  1:47   ` Axel Lin [this message]
2011-05-19  9:58     ` Axel Lin
2011-05-19 21:08       ` Mark Brown

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=BANLkTimU7FyuTuVw1ezOo381a798Ec+uCw@mail.gmail.com \
    --to=axel.lin@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /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

all inboxes | Powered by JetHome®