Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1394160
| Path | csiph.com!goblin2!goblin1!goblin.stu.neva.ru!nntpspool.opticnetworks.net!nntpspool01.opticnetworks.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] reset: allow to pass NULL pointer to reset_control_put() |
| Date | Wed, 04 May 2016 13:20:03 +0200 |
| Message-ID | <rv30v-2OD-29@gated-at.bofh.it> (permalink) |
| Dkim-Filter | OpenDKIM Filter v2.10.3 conuserg-10.nifty.com u44BGoPD004867 |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1462360611; bh=RNi4hwFfkBAwj0uPeFZ/9qZ+8IVzOsCT4Kbmp7A52nU=; h=From:To:Cc:Subject:Date:From; b=SFB4MbUQSWfrO/C5o2ZlXuxpyAW96zyHd3KcEKivXlJy6th/t6hJcA30e2hpnUBGf NwDlJCz4R/dT1YJYRhC58P4fSTpHQSd5w3VjdjEaeHv/C40aF6ChPYtC3FA01OL1Qa 39cb9JDScuWNxwdBcuST1Vq5hxhm3KZBt3ZY3IuzgTk9VgwhmTZO3QemU1Gz4XuaJ5 AOCPKQqYyEprQoRWgJCGIOhEiJnL5LQoBdyoujQ2asnxyFkvAuF25bLO+WN3OOyvqk QPh85ZYChcy4eoYe7qOWd2RO+thM4cS6pwnZ07YL1iaoFg/XfuBBDZfx3tiehe3ppA DYe8aKU+OB1aw== |
| X-Nifty-Srcip | [153.142.97.92] |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 27 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Arnd Bergmann <arnd@arndb.de>, Masahiro Yamada <yamada.masahiro@socionext.com> |
| X-Original-Date | Wed, 4 May 2016 20:17:51 +0900 |
| X-Original-Message-ID | <1462360671-13668-1-git-send-email-yamada.masahiro@socionext.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1394160 |
Show key headers only | View raw
Currently, reset_control_put() just returns for error pointer,
but not for NULL pointer. This is not reasonable.
Passing NULL pointer should be allowed as well to make failure path
handling easier.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
drivers/reset/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 181b05d..7bb16d1 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -288,7 +288,7 @@ EXPORT_SYMBOL_GPL(reset_control_get);
void reset_control_put(struct reset_control *rstc)
{
- if (IS_ERR(rstc))
+ if (IS_ERR_OR_NULL(rstc))
return;
module_put(rstc->rcdev->owner);
--
1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] reset: allow to pass NULL pointer to reset_control_put() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-05-04 13:20 +0200
Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() Arnd Bergmann <arnd@arndb.de> - 2016-05-04 13:30 +0200
Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-05-04 13:40 +0200
Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() Philipp Zabel <p.zabel@pengutronix.de> - 2016-05-04 14:40 +0200
Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() Arnd Bergmann <arnd@arndb.de> - 2016-05-04 14:50 +0200
Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() Arnd Bergmann <arnd@arndb.de> - 2016-05-04 14:40 +0200
csiph-web