On 3 June 2015 at 11:36, Marek Szyprowski <m.szyprow...@samsung.com> wrote:
> alloc_dev_context_buffer method might fail, so add proper return value
> check.
>
> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>

Acked-by: Kamil Debski <ka...@wypas.org>

> ---
>  drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c 
> b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c
> index f176096..b1b1491 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c
> @@ -37,8 +37,12 @@ static int s5p_mfc_sys_init_cmd_v6(struct s5p_mfc_dev *dev)
>  {
>         struct s5p_mfc_cmd_args h2r_args;
>         struct s5p_mfc_buf_size_v6 *buf_size = dev->variant->buf_size->priv;
> +       int ret;
> +
> +       ret = s5p_mfc_hw_call(dev->mfc_ops, alloc_dev_context_buffer, dev);
> +       if (ret)
> +               return ret;
>
> -       s5p_mfc_hw_call(dev->mfc_ops, alloc_dev_context_buffer, dev);
>         mfc_write(dev, dev->ctx_buf.dma, S5P_FIMV_CONTEXT_MEM_ADDR_V6);
>         mfc_write(dev, buf_size->dev_ctx, S5P_FIMV_CONTEXT_MEM_SIZE_V6);
>         return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_SYS_INIT_V6,
> --
> 1.9.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to