mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Matthew Garrett <mjg@redhat.com>, platform-driver-x86@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, greg@kroah.com,
	David Herrmann <dh.herrmann@googlemail.com>,
	stable <stable@kernel.org>
Subject: [patch 5/8] Platform: Fix error path in samsung-laptop init
Date: Tue, 20 Sep 2011 09:16:12 -0700	[thread overview]
Message-ID: <20110920161735.910037116@clark.kroah.org> (raw)
In-Reply-To: <20110920161743.GA32737@kroah.com>

From: David Herrmann <dh.herrmann@googlemail.com>

samsung_init() should not return success if not all devices are initialized.
Otherwise, samsung_exit() will dereference sdev NULL pointers and others.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/platform/x86/samsung-laptop.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -799,7 +799,7 @@ static int __init samsung_init(void)
 	sabi_iface = ioremap_nocache(ifaceP, 16);
 	if (!sabi_iface) {
 		pr_err("Can't remap %x\n", ifaceP);
-		goto exit;
+		goto error_no_signature;
 	}
 	if (debug) {
 		printk(KERN_DEBUG "ifaceP = 0x%08x\n", ifaceP);
@@ -851,7 +851,6 @@ static int __init samsung_init(void)
 	if (retval)
 		goto error_file_create;
 
-exit:
 	return 0;
 
 error_file_create:



  parent reply	other threads:[~2011-09-20 16:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20 16:17 [patch 0/8] Samsung Laptop driver patches - resend Greg KH
2011-09-20 16:16 ` [patch 1/8] platform: samsung_laptop: add dmi information for Samsung R700 laptops Greg KH
2011-09-20 16:16 ` [patch 2/8] Platform: samsung_laptop: add support for X520 machines Greg KH
2011-09-20 16:16 ` [patch 3/8] Platform: samsung_laptop: samsung backlight for R528/R728 Greg KH
2011-09-20 16:16 ` [patch 4/8] platform: samsung_laptop: fix samsung brightness min/max calculations Greg KH
2011-09-20 16:16 ` Greg KH [this message]
2011-09-20 16:16 ` [patch 6/8] Platform: Brightness quirk for samsung laptop driver Greg KH
2011-09-20 16:16 ` [patch 7/8] Platform: Samsung laptop DMI info for NC210/NC110 Greg KH
2011-09-20 16:16 ` [patch 8/8] Platform: fix samsung-laptop DMI identification for N220 model Greg KH
2011-11-06 22:54 ` [patch 0/8] Samsung Laptop driver patches - resend Corentin Chary
2011-11-07 18:12   ` Greg KH
2011-11-07 22:57     ` Corentin Chary
2011-11-13  9:52       ` Corentin Chary
2011-11-13 15:58         ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2011-09-01 22:54 [patch 0/8] Samsung Laptop driver patches gregkh
2011-09-01 22:50 ` [patch 5/8] Platform: Fix error path in samsung-laptop init gregkh
2011-09-20 12:21   ` David Herrmann
2011-09-20 16:15     ` Greg KH

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=20110920161735.910037116@clark.kroah.org \
    --to=gregkh@suse.de \
    --cc=dh.herrmann@googlemail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=stable@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

all inboxes | Powered by JetHome®