Re: [PATCH] regmap: Fix 'ret' would return an uninitialized value

From: Geyslan Gregório Bem
Date: Mon Nov 18 2013 - 08:24:25 EST


2013/11/18 Caizhiyong <caizhiyong@xxxxxxxxxxxxx>:
> From: Cai Zhiyong <caizhiyong@xxxxxxxxxx>
> Date: Mon, 18 Nov 2013 20:21:49 +0800
> Subject: [PATCH] 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 <caizhiyong@xxxxxxxxxx>

Reviewed-by: Geyslan G. Bem <geyslan@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/