Hi Roberto,

Thanks for the patch.

On Tue, May 21, 2013 at 05:32:30PM -0300, Roberto Alcântara wrote:
> Ensure release_firmware is called if kmalloc fails.
> 
> Signed-off-by:Roberto Alcantara <[email protected]>
> diff --git a/linux/drivers/media/common/siano/smscoreapi.c
> b/linux/drivers/media/common/siano/smscoreapi.c
> index dbe9b4d..f65b4e3 100644
> --- a/linux/drivers/media/common/siano/smscoreapi.c
> +++ b/linux/drivers/media/common/siano/smscoreapi.c
> @@ -1173,16 +1173,16 @@ static int
> smscore_load_firmware_from_file(struct smscore_device_t *coredev,
>               GFP_KERNEL | GFP_DMA);
>      if (!fw_buf) {
>          sms_err("failed to allocate firmware buffer");
> -        return -ENOMEM;

How about instead adding a label before release_firmware() for error
handling? I think that'd be cleaner than this.

Could you also use git send-email to send the patch, please?

-- 
Kind regards,

Sakari Ailus
e-mail: [email protected]     XMPP: [email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to