+ eisa-call-put_device-if-device_register-fails.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + eisa-call-put_device-if-device_register-fails.patch added to -mm tree
To: levex@xxxxxxxxx,bhelgaas@xxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Mon, 16 Dec 2013 15:17:51 -0800


The patch titled
     Subject: drivers/eisa/eisa-bus.c: call put_device if device_register fails
has been added to the -mm tree.  Its filename is
     eisa-call-put_device-if-device_register-fails.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/eisa-call-put_device-if-device_register-fails.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/eisa-call-put_device-if-device_register-fails.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Levente Kurusa <levex@xxxxxxxxx>
Subject: drivers/eisa/eisa-bus.c: call put_device if device_register fails

We need to give up the last reference to edev->dev, so we need to call
put_device().

Signed-off-by: Levente Kurusa <levex@xxxxxxxxx>
Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/eisa/eisa-bus.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN drivers/eisa/eisa-bus.c~eisa-call-put_device-if-device_register-fails drivers/eisa/eisa-bus.c
--- a/drivers/eisa/eisa-bus.c~eisa-call-put_device-if-device_register-fails
+++ a/drivers/eisa/eisa-bus.c
@@ -232,8 +232,10 @@ static int __init eisa_init_device(struc
 static int __init eisa_register_device(struct eisa_device *edev)
 {
 	int rc = device_register(&edev->dev);
-	if (rc)
+	if (rc) {
+		put_device(&edev->dev);
 		return rc;
+	}
 
 	rc = device_create_file(&edev->dev, &dev_attr_signature);
 	if (rc)
_

Patches currently in -mm which might be from levex@xxxxxxxxx are

kstrtox-remove-redundant-cleanup.patch
lib-cmdlinec-declare-exported-symbols-immediately.patch
linux-next.patch
backlight-lcd-call-put_device-if-device_register-fails.patch
net-phy-call-put_device-on-device_register-failure.patch
eisa-call-put_device-if-device_register-fails.patch
w1-call-put_device-if-device_register-fails.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux