<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/rtc, branch v5.4.131</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>rtc: ds1307: Fix wday settings for rx8130</title>
<updated>2021-05-19T08:08:26+00:00</updated>
<author>
<name>Nobuhiro Iwamatsu</name>
<email>nobuhiro1.iwamatsu@toshiba.co.jp</email>
</author>
<published>2021-04-20T02:39:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=3dd2cd64466e78888b20b0e0d15abfaef40e8213'/>
<id>3dd2cd64466e78888b20b0e0d15abfaef40e8213</id>
<content type='text'>
[ Upstream commit 204756f016726a380bafe619438ed979088bd04a ]

rx8130 wday specifies the bit position, not BCD.

Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE")
Signed-off-by: Nobuhiro Iwamatsu &lt;nobuhiro1.iwamatsu@toshiba.co.jp&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210420023917.1949066-1-nobuhiro1.iwamatsu@toshiba.co.jp
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 204756f016726a380bafe619438ed979088bd04a ]

rx8130 wday specifies the bit position, not BCD.

Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE")
Signed-off-by: Nobuhiro Iwamatsu &lt;nobuhiro1.iwamatsu@toshiba.co.jp&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210420023917.1949066-1-nobuhiro1.iwamatsu@toshiba.co.jp
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: fsl-ftm-alarm: add MODULE_TABLE()</title>
<updated>2021-05-19T08:08:25+00:00</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2021-04-14T08:40:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=b37609ad2277c880dc3540eda2b697ea63bfda6e'/>
<id>b37609ad2277c880dc3540eda2b697ea63bfda6e</id>
<content type='text'>
[ Upstream commit 7fcb86185978661c9188397d474f90364745b8d9 ]

The module doesn't load automatically. Fix it by adding the missing
MODULE_TABLE().

Fixes: 7b0b551dbc1e ("rtc: fsl-ftm-alarm: add FTM alarm driver")
Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210414084006.17933-1-michael@walle.cc
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 7fcb86185978661c9188397d474f90364745b8d9 ]

The module doesn't load automatically. Fix it by adding the missing
MODULE_TABLE().

Fixes: 7b0b551dbc1e ("rtc: fsl-ftm-alarm: add FTM alarm driver")
Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210414084006.17933-1-michael@walle.cc
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: s5m: select REGMAP_I2C</title>
<updated>2021-03-04T09:26:29+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2021-01-14T10:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=d8a9db6dfa23d8523a70cac09c673a40f09437b1'/>
<id>d8a9db6dfa23d8523a70cac09c673a40f09437b1</id>
<content type='text'>
[ Upstream commit 1f0cbda3b452b520c5f3794f8f0e410e8bc7386a ]

The rtc-s5m uses the I2C regmap but doesn't select it in Kconfig so
depending on the configuration the build may fail. Fix it.

Fixes: 959df7778bbd ("rtc: Enable compile testing for Maxim and Samsung drivers")
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210114102219.23682-2-brgl@bgdev.pl
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 1f0cbda3b452b520c5f3794f8f0e410e8bc7386a ]

The rtc-s5m uses the I2C regmap but doesn't select it in Kconfig so
depending on the configuration the build may fail. Fix it.

Fixes: 959df7778bbd ("rtc: Enable compile testing for Maxim and Samsung drivers")
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210114102219.23682-2-brgl@bgdev.pl
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: pl031: fix resource leak in pl031_probe</title>
<updated>2021-01-06T13:48:39+00:00</updated>
<author>
<name>Zheng Liang</name>
<email>zhengliang6@huawei.com</email>
</author>
<published>2020-11-12T09:31:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=a95049c51417522b466ce4fcdfd6668afe226938'/>
<id>a95049c51417522b466ce4fcdfd6668afe226938</id>
<content type='text'>
[ Upstream commit 1eab0fea2514b269e384c117f5b5772b882761f0 ]

When devm_rtc_allocate_device is failed in pl031_probe, it should release
mem regions with device.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Zheng Liang &lt;zhengliang6@huawei.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20201112093139.32566-1-zhengliang6@huawei.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 1eab0fea2514b269e384c117f5b5772b882761f0 ]

When devm_rtc_allocate_device is failed in pl031_probe, it should release
mem regions with device.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Zheng Liang &lt;zhengliang6@huawei.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20201112093139.32566-1-zhengliang6@huawei.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: sun6i: Fix memleak in sun6i_rtc_clk_init</title>
<updated>2021-01-06T13:48:39+00:00</updated>
<author>
<name>Dinghao Liu</name>
<email>dinghao.liu@zju.edu.cn</email>
</author>
<published>2020-10-20T06:12:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=569da7c3d9a31522433ad71c9d204b1df89bff90'/>
<id>569da7c3d9a31522433ad71c9d204b1df89bff90</id>
<content type='text'>
[ Upstream commit 28d211919e422f58c1e6c900e5810eee4f1ce4c8 ]

When clk_hw_register_fixed_rate_with_accuracy() fails,
clk_data should be freed. It's the same for the subsequent
two error paths, but we should also unregister the already
registered clocks in them.

Signed-off-by: Dinghao Liu &lt;dinghao.liu@zju.edu.cn&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201020061226.6572-1-dinghao.liu@zju.edu.cn
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 28d211919e422f58c1e6c900e5810eee4f1ce4c8 ]

When clk_hw_register_fixed_rate_with_accuracy() fails,
clk_data should be freed. It's the same for the subsequent
two error paths, but we should also unregister the already
registered clocks in them.

Signed-off-by: Dinghao Liu &lt;dinghao.liu@zju.edu.cn&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201020061226.6572-1-dinghao.liu@zju.edu.cn
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ep93xx: Fix NULL pointer dereference in ep93xx_rtc_read_time</title>
<updated>2020-12-30T10:51:47+00:00</updated>
<author>
<name>Nikita Shubin</name>
<email>nikita.shubin@maquefel.me</email>
</author>
<published>2020-12-01T09:55:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=33afcf723a0e655d35a60afe451bba47c9045ed3'/>
<id>33afcf723a0e655d35a60afe451bba47c9045ed3</id>
<content type='text'>
commit 00c33482bb6110bce8110daa351f9b3baf4df7dc upstream.

Mismatch in probe platform_set_drvdata set's and method's that call
dev_get_platdata will result in "Unable to handle kernel NULL pointer
dereference", let's use according method for getting driver data after
platform_set_drvdata.

8&lt;--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = (ptrval)
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 5.9.10-00003-g723e101e0037-dirty #4
Hardware name: Technologic Systems TS-72xx SBC
PC is at ep93xx_rtc_read_time+0xc/0x2c
LR is at __rtc_read_time+0x4c/0x8c
[...]
[&lt;c02b01c8&gt;] (ep93xx_rtc_read_time) from [&lt;c02ac38c&gt;] (__rtc_read_time+0x4c/0x8c)
[&lt;c02ac38c&gt;] (__rtc_read_time) from [&lt;c02ac3f8&gt;] (rtc_read_time+0x2c/0x4c)
[&lt;c02ac3f8&gt;] (rtc_read_time) from [&lt;c02acc54&gt;] (__rtc_read_alarm+0x28/0x358)
[&lt;c02acc54&gt;] (__rtc_read_alarm) from [&lt;c02abd80&gt;] (__rtc_register_device+0x124/0x2ec)
[&lt;c02abd80&gt;] (__rtc_register_device) from [&lt;c02b028c&gt;] (ep93xx_rtc_probe+0xa4/0xac)
[&lt;c02b028c&gt;] (ep93xx_rtc_probe) from [&lt;c026424c&gt;] (platform_drv_probe+0x24/0x5c)
[&lt;c026424c&gt;] (platform_drv_probe) from [&lt;c0262918&gt;] (really_probe+0x218/0x374)
[&lt;c0262918&gt;] (really_probe) from [&lt;c0262da0&gt;] (device_driver_attach+0x44/0x60)
[&lt;c0262da0&gt;] (device_driver_attach) from [&lt;c0262e70&gt;] (__driver_attach+0xb4/0xc0)
[&lt;c0262e70&gt;] (__driver_attach) from [&lt;c0260d44&gt;] (bus_for_each_dev+0x68/0xac)
[&lt;c0260d44&gt;] (bus_for_each_dev) from [&lt;c026223c&gt;] (driver_attach+0x18/0x24)
[&lt;c026223c&gt;] (driver_attach) from [&lt;c0261dd8&gt;] (bus_add_driver+0x150/0x1b4)
[&lt;c0261dd8&gt;] (bus_add_driver) from [&lt;c026342c&gt;] (driver_register+0xb0/0xf4)
[&lt;c026342c&gt;] (driver_register) from [&lt;c0264210&gt;] (__platform_driver_register+0x30/0x48)
[&lt;c0264210&gt;] (__platform_driver_register) from [&lt;c04cb9ac&gt;] (ep93xx_rtc_driver_init+0x10/0x1c)
[&lt;c04cb9ac&gt;] (ep93xx_rtc_driver_init) from [&lt;c000973c&gt;] (do_one_initcall+0x7c/0x1c0)
[&lt;c000973c&gt;] (do_one_initcall) from [&lt;c04b9ecc&gt;] (kernel_init_freeable+0x168/0x1ac)
[&lt;c04b9ecc&gt;] (kernel_init_freeable) from [&lt;c03b2228&gt;] (kernel_init+0x8/0xf4)
[&lt;c03b2228&gt;] (kernel_init) from [&lt;c00082c0&gt;] (ret_from_fork+0x14/0x34)
Exception stack(0xc441dfb0 to 0xc441dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e12fff1e e92d4010 e590303c e1a02001 (e5933000)
---[ end trace c914d6030eaa95c8 ]---

Fixes: b809d192eb98 ("rtc: ep93xx: stop setting platform_data")
Signed-off-by: Nikita Shubin &lt;nikita.shubin@maquefel.me&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201201095507.10317-1-nikita.shubin@maquefel.me
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 00c33482bb6110bce8110daa351f9b3baf4df7dc upstream.

Mismatch in probe platform_set_drvdata set's and method's that call
dev_get_platdata will result in "Unable to handle kernel NULL pointer
dereference", let's use according method for getting driver data after
platform_set_drvdata.

8&lt;--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = (ptrval)
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 5.9.10-00003-g723e101e0037-dirty #4
Hardware name: Technologic Systems TS-72xx SBC
PC is at ep93xx_rtc_read_time+0xc/0x2c
LR is at __rtc_read_time+0x4c/0x8c
[...]
[&lt;c02b01c8&gt;] (ep93xx_rtc_read_time) from [&lt;c02ac38c&gt;] (__rtc_read_time+0x4c/0x8c)
[&lt;c02ac38c&gt;] (__rtc_read_time) from [&lt;c02ac3f8&gt;] (rtc_read_time+0x2c/0x4c)
[&lt;c02ac3f8&gt;] (rtc_read_time) from [&lt;c02acc54&gt;] (__rtc_read_alarm+0x28/0x358)
[&lt;c02acc54&gt;] (__rtc_read_alarm) from [&lt;c02abd80&gt;] (__rtc_register_device+0x124/0x2ec)
[&lt;c02abd80&gt;] (__rtc_register_device) from [&lt;c02b028c&gt;] (ep93xx_rtc_probe+0xa4/0xac)
[&lt;c02b028c&gt;] (ep93xx_rtc_probe) from [&lt;c026424c&gt;] (platform_drv_probe+0x24/0x5c)
[&lt;c026424c&gt;] (platform_drv_probe) from [&lt;c0262918&gt;] (really_probe+0x218/0x374)
[&lt;c0262918&gt;] (really_probe) from [&lt;c0262da0&gt;] (device_driver_attach+0x44/0x60)
[&lt;c0262da0&gt;] (device_driver_attach) from [&lt;c0262e70&gt;] (__driver_attach+0xb4/0xc0)
[&lt;c0262e70&gt;] (__driver_attach) from [&lt;c0260d44&gt;] (bus_for_each_dev+0x68/0xac)
[&lt;c0260d44&gt;] (bus_for_each_dev) from [&lt;c026223c&gt;] (driver_attach+0x18/0x24)
[&lt;c026223c&gt;] (driver_attach) from [&lt;c0261dd8&gt;] (bus_add_driver+0x150/0x1b4)
[&lt;c0261dd8&gt;] (bus_add_driver) from [&lt;c026342c&gt;] (driver_register+0xb0/0xf4)
[&lt;c026342c&gt;] (driver_register) from [&lt;c0264210&gt;] (__platform_driver_register+0x30/0x48)
[&lt;c0264210&gt;] (__platform_driver_register) from [&lt;c04cb9ac&gt;] (ep93xx_rtc_driver_init+0x10/0x1c)
[&lt;c04cb9ac&gt;] (ep93xx_rtc_driver_init) from [&lt;c000973c&gt;] (do_one_initcall+0x7c/0x1c0)
[&lt;c000973c&gt;] (do_one_initcall) from [&lt;c04b9ecc&gt;] (kernel_init_freeable+0x168/0x1ac)
[&lt;c04b9ecc&gt;] (kernel_init_freeable) from [&lt;c03b2228&gt;] (kernel_init+0x8/0xf4)
[&lt;c03b2228&gt;] (kernel_init) from [&lt;c00082c0&gt;] (ret_from_fork+0x14/0x34)
Exception stack(0xc441dfb0 to 0xc441dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e12fff1e e92d4010 e590303c e1a02001 (e5933000)
---[ end trace c914d6030eaa95c8 ]---

Fixes: b809d192eb98 ("rtc: ep93xx: stop setting platform_data")
Signed-off-by: Nikita Shubin &lt;nikita.shubin@maquefel.me&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201201095507.10317-1-nikita.shubin@maquefel.me
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: pcf2127: fix pcf2127_nvmem_read/write() returns</title>
<updated>2020-12-30T10:51:02+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-10-22T07:04:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=de49a51e7938b77a4bc2e79733f57ecd15f75b50'/>
<id>de49a51e7938b77a4bc2e79733f57ecd15f75b50</id>
<content type='text'>
[ Upstream commit ba1c30bf3f2536f248d262c6f257b5a787305991 ]

These functions should return zero on success.  Non-zero returns are
treated as error.  On some paths, this doesn't matter but in
nvmem_cell_read() a non-zero return would be passed to ERR_PTR() and
lead to an Oops.

Fixes: d6c3029f32f7 ("rtc: pcf2127: add support for accessing internal static RAM")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201022070451.GA2817669@mwanda
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit ba1c30bf3f2536f248d262c6f257b5a787305991 ]

These functions should return zero on success.  Non-zero returns are
treated as error.  On some paths, this doesn't matter but in
nvmem_cell_read() a non-zero return would be passed to ERR_PTR() and
lead to an Oops.

Fixes: d6c3029f32f7 ("rtc: pcf2127: add support for accessing internal static RAM")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201022070451.GA2817669@mwanda
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: rx8010: don't modify the global rtc ops</title>
<updated>2020-11-05T10:43:33+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2020-09-14T15:45:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=da3ccf5b20458d1ceafc399130cb47aaac56428b'/>
<id>da3ccf5b20458d1ceafc399130cb47aaac56428b</id>
<content type='text'>
commit d3b14296da69adb7825022f3224ac6137eb30abf upstream.

The way the driver is implemented is buggy for the (admittedly unlikely)
use case where there are two RTCs with one having an interrupt configured
and the second not. This is caused by the fact that we use a global
rtc_class_ops struct which we modify depending on whether the irq number
is present or not.

Fix it by using two const ops structs with and without alarm operations.
While at it: not being able to request a configured interrupt is an error
so don't ignore it and bail out of probe().

Fixes: ed13d89b08e3 ("rtc: Add Epson RX8010SJ RTC driver")
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200914154601.32245-2-brgl@bgdev.pl
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d3b14296da69adb7825022f3224ac6137eb30abf upstream.

The way the driver is implemented is buggy for the (admittedly unlikely)
use case where there are two RTCs with one having an interrupt configured
and the second not. This is caused by the fact that we use a global
rtc_class_ops struct which we modify depending on whether the irq number
is present or not.

Fix it by using two const ops structs with and without alarm operations.
While at it: not being able to request a configured interrupt is an error
so don't ignore it and bail out of probe().

Fixes: ed13d89b08e3 ("rtc: Add Epson RX8010SJ RTC driver")
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200914154601.32245-2-brgl@bgdev.pl
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1374: fix possible race condition</title>
<updated>2020-10-01T11:17:43+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2020-03-06T07:34:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=cdb785710edd3a4d6897df9e933b0cf8289dd50e'/>
<id>cdb785710edd3a4d6897df9e933b0cf8289dd50e</id>
<content type='text'>
[ Upstream commit c11af8131a4e7ba1960faed731ee7e84c2c13c94 ]

The RTC IRQ is requested before the struct rtc_device is allocated,
this may lead to a NULL pointer dereference in the IRQ handler.

To fix this issue, allocating the rtc_device struct before requesting
the RTC IRQ using devm_rtc_allocate_device, and use rtc_register_device
to register the RTC device.

Link: https://lore.kernel.org/r/20200306073404.56921-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit c11af8131a4e7ba1960faed731ee7e84c2c13c94 ]

The RTC IRQ is requested before the struct rtc_device is allocated,
this may lead to a NULL pointer dereference in the IRQ handler.

To fix this issue, allocating the rtc_device struct before requesting
the RTC IRQ using devm_rtc_allocate_device, and use rtc_register_device
to register the RTC device.

Link: https://lore.kernel.org/r/20200306073404.56921-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: sa1100: fix possible race condition</title>
<updated>2020-10-01T11:17:43+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2020-03-06T01:01:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=45c1212d91f7e2b8ec6c3760e97eb971a2aa646f'/>
<id>45c1212d91f7e2b8ec6c3760e97eb971a2aa646f</id>
<content type='text'>
[ Upstream commit f2997775b111c6d660c32a18d5d44d37cb7361b1 ]

Both RTC IRQs are requested before the struct rtc_device is allocated,
this may lead to a NULL pointer dereference in the IRQ handler.

To fix this issue, allocating the rtc_device struct before requesting
the IRQs using devm_rtc_allocate_device, and use rtc_register_device
to register the RTC device.

Link: https://lore.kernel.org/r/20200306010146.39762-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit f2997775b111c6d660c32a18d5d44d37cb7361b1 ]

Both RTC IRQs are requested before the struct rtc_device is allocated,
this may lead to a NULL pointer dereference in the IRQ handler.

To fix this issue, allocating the rtc_device struct before requesting
the IRQs using devm_rtc_allocate_device, and use rtc_register_device
to register the RTC device.

Link: https://lore.kernel.org/r/20200306010146.39762-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
