kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: m41t80: return NULL rather than a plain 0 integer
@ 2021-09-25 22:34 Colin King
  2021-10-01 21:42 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-09-25 22:34 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni, linux-rtc
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Function m41t80_sqw_register_clk returns a pointer to struct clk,
so returning a plain 0 integer isn't good practice. Fix this by
returning a NULL instead.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/rtc/rtc-m41t80.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index f736f8c22e96..6d383b629d20 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -557,7 +557,7 @@ static struct clk *m41t80_sqw_register_clk(struct m41t80_data *m41t80)
 		 * registered automatically when being referenced.
 		 */
 		of_node_put(fixed_clock);
-		return 0;
+		return NULL;
 	}
 
 	/* First disable the clock */
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtc: m41t80: return NULL rather than a plain 0 integer
  2021-09-25 22:34 [PATCH] rtc: m41t80: return NULL rather than a plain 0 integer Colin King
@ 2021-10-01 21:42 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2021-10-01 21:42 UTC (permalink / raw)
  To: Colin King, Alessandro Zummo, linux-rtc
  Cc: Alexandre Belloni, linux-kernel, kernel-janitors

On Sat, 25 Sep 2021 23:34:41 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Function m41t80_sqw_register_clk returns a pointer to struct clk,
> so returning a plain 0 integer isn't good practice. Fix this by
> returning a NULL instead.
> 
> 
> [...]

Applied, thanks!

[1/1] rtc: m41t80: return NULL rather than a plain 0 integer
      commit: 7caadcfa8a7c6f8e754d982b99d959a222e7f863

Best regards,
-- 
Alexandre Belloni <alexandre.belloni@bootlin.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-01 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-25 22:34 [PATCH] rtc: m41t80: return NULL rather than a plain 0 integer Colin King
2021-10-01 21:42 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).