Skip to content

Commit

Permalink
rtc: m41t80: return NULL rather than a plain 0 integer
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Colin Ian King authored and alexandrebelloni committed Oct 1, 2021
1 parent f360668 commit 7caadcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-m41t80.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 7caadcf

Please sign in to comment.