From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: linux-acpi@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH 2/2] ACPI / LPSS: make code less confusing for reader
Date: Wed, 20 Mar 2013 14:14:30 +0200 [thread overview]
Message-ID: <1363781670-28775-2-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1363781670-28775-1-git-send-email-andriy.shevchenko@linux.intel.com>
The excerpt like this:
if (err) {
err = 0;
goto error_out;
}
makes a reader confused even if it's commented. Let's do necessary actions and
return no error explicitly.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/acpi/acpi_lpss.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index c695841..5d7ded2 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -152,8 +152,8 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
* Skip the device, but don't terminate the namespace
* scan.
*/
- ret = 0;
- goto err_out;
+ kfree(pdata);
+ return 0;
}
}
--
1.8.2.rc0.22.gb3600c3
next prev parent reply other threads:[~2013-03-20 12:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 12:14 [PATCH 1/2] ACPI / LPSS: Make condition local to lpt_register_clock_device Andy Shevchenko
2013-03-20 12:14 ` Andy Shevchenko [this message]
2013-03-26 13:36 ` [PATCH 2/2] ACPI / LPSS: make code less confusing for reader Rafael J. Wysocki
2013-03-26 13:37 ` [PATCH 1/2] ACPI / LPSS: Make condition local to lpt_register_clock_device Rafael J. Wysocki
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=1363781670-28775-2-git-send-email-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@sisk.pl \
/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