devres: move the size check from alloc_dr() into a separate function
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 29 Jun 2020 06:50:04 +0000 (08:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Jul 2020 12:36:02 +0000 (14:36 +0200)
commitdc2a633ccb608a1a8109ad0d488c98cc776bef72
tree36d2a7f3dd37af97f83211f31ce563a9e741d3e7
parent63160c0a7f1df4420607c27793db0bc5f67ef95f
devres: move the size check from alloc_dr() into a separate function

We will perform the same size check in devm_krealloc(). Move the relevant
code into a separate helper.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20200629065008.27620-3-brgl@bgdev.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/devres.c