lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] media: dw100: Fix an error handling path in dw100_probe()
From
Le 22/08/2022 à 11:56, Laurent Pinchart a écrit :
> Hi Christophe,
>
> Thank you for the patch.
>
> On Mon, Aug 22, 2022 at 11:40:43AM +0200, Christophe JAILLET wrote:
>> After a successful call to media_device_init() it is safer to call
>> media_device_init().
>
> I assume you meant media_device_cleanup() ? With this fixed,

+1.
I assume that it can be fixed when applied (otherwise tell me and I'll
send a v2).

CJ

>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
>> Add the missing call in the error handling path of the probe, as already
>> done in the remove function.
>>
>> Fixes: bd090d4d995a ("media: dw100: Add i.MX8MP dw100 dewarper driver")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>> drivers/media/platform/nxp/dw100/dw100.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/media/platform/nxp/dw100/dw100.c b/drivers/media/platform/nxp/dw100/dw100.c
>> index 94518f0e486b..b3b057798ab6 100644
>> --- a/drivers/media/platform/nxp/dw100/dw100.c
>> +++ b/drivers/media/platform/nxp/dw100/dw100.c
>> @@ -1623,6 +1623,7 @@ static int dw100_probe(struct platform_device *pdev)
>> error_v4l2:
>> video_unregister_device(vfd);
>> err_m2m:
>> + media_device_cleanup(&dw_dev->mdev);
>> v4l2_m2m_release(dw_dev->m2m_dev);
>> err_v4l2:
>> v4l2_device_unregister(&dw_dev->v4l2_dev);
>

\
 
 \ /
  Last update: 2022-08-22 12:56    [W:0.096 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site