]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
rtc: rx8010: prefer sizeof(*val) over sizeof(struct type_of_val)
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 14 Sep 2020 15:45:57 +0000 (17:45 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 15 Sep 2020 08:50:37 +0000 (10:50 +0200)
commit666f21413b881e159efaf862f119d4d058fa2c4a
tree2abd90d99c7657b23d781369a3de486ceb7b6d1c
parent955a123c14906e3adc43d43281f8fde91f631f7f
rtc: rx8010: prefer sizeof(*val) over sizeof(struct type_of_val)

Using the size of the variable is preferred over using the size of its
type when allocating memory. Convert the call to devm_kzalloc() in
probe().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200914154601.32245-11-brgl@bgdev.pl
drivers/rtc/rtc-rx8010.c