* [PATCH] media: s5p-mfc fix video device release double release in probe error path
@ 2016-06-09 1:35 Shuah Khan
2016-06-13 13:37 ` Javier Martinez Canillas
0 siblings, 1 reply; 2+ messages in thread
From: Shuah Khan @ 2016-06-09 1:35 UTC (permalink / raw)
To: kyungmin.park, k.debski, jtp.park, mchehab
Cc: Shuah Khan, linux-arm-kernel, linux-media, linux-kernel
Fix Decoder and encoder video device double release in probe error path.
video_device_release(dev->vfd_dec) get called twice if decoder register
fails. Also, video_device_release(dev->vfd_enc) get called twice if encoder
register fails.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 6ee620e..274b4f1 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1266,7 +1266,6 @@ static int s5p_mfc_probe(struct platform_device *pdev)
ret = video_register_device(dev->vfd_dec, VFL_TYPE_GRABBER, 0);
if (ret) {
v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");
- video_device_release(dev->vfd_dec);
goto err_dec_reg;
}
v4l2_info(&dev->v4l2_dev,
@@ -1275,7 +1274,6 @@ static int s5p_mfc_probe(struct platform_device *pdev)
ret = video_register_device(dev->vfd_enc, VFL_TYPE_GRABBER, 0);
if (ret) {
v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");
- video_device_release(dev->vfd_enc);
goto err_enc_reg;
}
v4l2_info(&dev->v4l2_dev,
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: s5p-mfc fix video device release double release in probe error path
2016-06-09 1:35 [PATCH] media: s5p-mfc fix video device release double release in probe error path Shuah Khan
@ 2016-06-13 13:37 ` Javier Martinez Canillas
0 siblings, 0 replies; 2+ messages in thread
From: Javier Martinez Canillas @ 2016-06-13 13:37 UTC (permalink / raw)
To: Shuah Khan
Cc: Kyungmin Park, Kamil Debski, jtp.park, Mauro Carvalho Chehab,
linux-arm-kernel, Linux Media Mailing List, Linux Kernel
Hello Shuah,
On Wed, Jun 8, 2016 at 9:35 PM, Shuah Khan <shuahkh@osg.samsung.com> wrote:
> Fix Decoder and encoder video device double release in probe error path.
> video_device_release(dev->vfd_dec) get called twice if decoder register
> fails. Also, video_device_release(dev->vfd_enc) get called twice if encoder
> register fails.
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
Right, thanks for the fix.
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Best regards,
Javier
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-13 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09 1:35 [PATCH] media: s5p-mfc fix video device release double release in probe error path Shuah Khan
2016-06-13 13:37 ` Javier Martinez Canillas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).