All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Kate Hsuan <hpa@redhat.com>, Robert Mast <rn.mast@zonnet.nl>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH 3/4] media: atomisp: mt9m114: Add missing mutex_init() call
Date: Mon, 14 Oct 2024 14:31:44 +0300	[thread overview]
Message-ID: <Zw0BIPSWN_vR48xf@smile.fi.intel.com> (raw)
In-Reply-To: <20241013154056.12532-4-hdegoede@redhat.com>

On Sun, Oct 13, 2024 at 05:40:55PM +0200, Hans de Goede wrote:
> The input_lock was not being initialized, fix this.
> 
> Also switch to devm_kzalloc() for the main driver data struct, so that
> devm_mutex_init() can be used for this.

...

>  		ret = mt9m114_s_config(&dev->sd, client->irq, pdata);
>  	if (!pdata || ret) {

Hmm... What is the ret value when no pdata is provided?

>  		v4l2_device_unregister_subdev(&dev->sd);
> -		kfree(dev);
>  		return ret;
>  	}

...

>  	ret = atomisp_register_i2c_module(&dev->sd, pdata);
>  	if (ret) {
>  		v4l2_device_unregister_subdev(&dev->sd);
> -		kfree(dev);
>  		/* Coverity CID 298095 - return on error */

This comment is useless. But it seems we tend to drop this code completely in
the future.

>  		return ret;
>  	}

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-10-14 11:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-13 15:40 [PATCH 0/4] media: atomisp: mt9m114: Make it work on Asus T100TA Hans de Goede
2024-10-13 15:40 ` [PATCH 1/4] media: atomisp: Fix WARN_ON() in vb2_start_streaming() triggering Hans de Goede
2024-10-14 11:28   ` Andy Shevchenko
2024-10-13 15:40 ` [PATCH 2/4] media: atomisp: mt9m114: Disable V4L2_CID_3A_LOCK control Hans de Goede
2024-10-13 15:40 ` [PATCH 3/4] media: atomisp: mt9m114: Add missing mutex_init() call Hans de Goede
2024-10-14 11:31   ` Andy Shevchenko [this message]
2024-10-14 12:11     ` Hans de Goede
2024-10-13 15:40 ` [PATCH 4/4] media: atomisp: mt9m114: Fix fmt->code not getting set on try_fmt Hans de Goede
2024-10-14 11:32 ` [PATCH 0/4] media: atomisp: mt9m114: Make it work on Asus T100TA Andy Shevchenko
2024-10-14 12:09   ` Hans de Goede
2024-11-04 11:06 ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zw0BIPSWN_vR48xf@smile.fi.intel.com \
    --to=andy@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=hpa@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=rn.mast@zonnet.nl \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.