Re: [PATCH] media: nxp: fix wrong return pointer check in mxc_isi_crossbar_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yang,

Thank you for the patch.

On Tue, Jul 25, 2023 at 09:00:24PM +0800, Yang Yingliang wrote:
> It should check 'xbar->inputs', when allocate memory for it.
> 
> Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver")

I'll add

Cc: stable@xxxxxxxxxxxxxxx

> Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

> ---
>  drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
> index f7447b2f4d77..9fcfc3925733 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
> @@ -483,7 +483,7 @@ int mxc_isi_crossbar_init(struct mxc_isi_dev *isi)
>  
>  	xbar->inputs = kcalloc(xbar->num_sinks, sizeof(*xbar->inputs),
>  			       GFP_KERNEL);
> -	if (!xbar->pads) {
> +	if (!xbar->inputs) {
>  		ret = -ENOMEM;
>  		goto err_free;
>  	}

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux