regmap: Fix 'ret' would return an uninitialized value
regmap: Fix 'ret' would return an uninitialized value

This patch give a warning when calling regmap_register_patch with
parameter num_regs <= 0.

When the num_regs parameter is zero and krealloc doesn't fail,
then the code would return an uninitialized value. However,
calling this function with num_regs == 0, would be a waste as it
essentially does nothing.

Signed-off-by: Cai Zhiyong <d1c7b17bc768d9f11ad59775310b0500c284cb19@huawei.com>
Reviewed-by: Geyslan G. Bem <f4b1cbbbea5f92f5c62d2b429aae4742785e210f@gmail.com>
Signed-off-by: Mark Brown <b51b9a92386687a9ac927cebfa0f978adeb8cea5@linaro.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs