Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: m41t80: return NULL rather than a plain 0 integer

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>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210925223441.182673-1-colin.king@canonical.com

authored by

Colin Ian King and committed by
Alexandre Belloni
7caadcfa f3606687

+1 -1
+1 -1
drivers/rtc/rtc-m41t80.c
··· 557 557 * registered automatically when being referenced. 558 558 */ 559 559 of_node_put(fixed_clock); 560 - return 0; 560 + return NULL; 561 561 } 562 562 563 563 /* First disable the clock */