+ memstick-core-fix-device_register-error-handling.patch added to -mm tree

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

 



The patch titled
     memstick: core: fix device_register() error handling
has been added to the -mm tree.  Its filename is
     memstick-core-fix-device_register-error-handling.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 ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: memstick: core: fix device_register() error handling
From: Vasiliy Kulikov <segooon@xxxxxxxxx>

If device_register() fails then call put_device().  See comment to
device_register.

Signed-off-by: Vasiliy Kulikov <segooon@xxxxxxxxx>
Cc: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
Cc: Alex Dubov <oakad@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/memstick/core/memstick.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN drivers/memstick/core/memstick.c~memstick-core-fix-device_register-error-handling drivers/memstick/core/memstick.c
--- a/drivers/memstick/core/memstick.c~memstick-core-fix-device_register-error-handling
+++ a/drivers/memstick/core/memstick.c
@@ -574,6 +574,7 @@ static void memstick_check(struct work_s
 		if (!host->card) {
 			host->card = card;
 			if (device_register(&card->dev)) {
+				put_device(&card->dev);
 				kfree(host->card);
 				host->card = NULL;
 			}
_

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

linux-next.patch
md-check-return-code-of-read_sb_page.patch
mm-mempolicy-check-return-code-of-check_range.patch
memstick-core-fix-device_register-error-handling.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