From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] media: atomisp: fix call to g_frame_interval
Date: Fri, 26 Jun 2020 16:04:56 +0200 [thread overview]
Message-ID: <59524c4e6c44a3b1d30099629ee49b583532d250.1593180146.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1593180146.git.mchehab+huawei@kernel.org>
The media core has now a check if fi->pad is bigger than zero
or bigger than sd->entity.num_pads, if the media controller
is defined.
This causes a call to g_frame_interval to return -EINVAL.
Fix it by first cleaning up the struct.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
drivers/staging/media/atomisp/pci/atomisp_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 7b936e5a5f03..388b57455204 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -109,7 +109,7 @@ struct atomisp_acc_pipe *atomisp_to_acc_pipe(struct video_device *dev)
static unsigned short atomisp_get_sensor_fps(struct atomisp_sub_device *asd)
{
- struct v4l2_subdev_frame_interval fi;
+ struct v4l2_subdev_frame_interval fi = { 0 };
struct atomisp_device *isp = asd->isp;
unsigned short fps = 0;
--
2.26.2
next prev parent reply other threads:[~2020-06-26 14:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-26 14:04 [PATCH 0/7] Some atomisp fixes and improvements Mauro Carvalho Chehab
2020-06-26 14:04 ` [PATCH 1/7] media: atomisp: reorganize the code under gmin_subdev_add() Mauro Carvalho Chehab
2020-06-26 14:04 ` [PATCH 2/7] media: atomisp: Prepare sensor support for ACPI PM Mauro Carvalho Chehab
2020-06-26 14:04 ` [PATCH 3/7] media: atomisp: properly parse CLK PMIC on newer devices Mauro Carvalho Chehab
2020-06-26 14:04 ` Mauro Carvalho Chehab [this message]
2020-06-26 14:04 ` [PATCH 5/7] media: atomisp: print info if gpio0 and gpio2 were detected Mauro Carvalho Chehab
2020-06-26 14:04 ` [PATCH 6/7] media: atomisp: split add from find subdev Mauro Carvalho Chehab
2020-06-26 14:04 ` [PATCH 7/7] media: atomisp: place all gpio parsing together Mauro Carvalho Chehab
2020-06-26 15:00 ` [PATCH 0/7] Some atomisp fixes and improvements Andy Shevchenko
2020-06-26 15:52 ` Mauro Carvalho Chehab
2020-06-26 15:56 ` Mauro Carvalho Chehab
2020-06-29 10:52 ` Andy Shevchenko
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=59524c4e6c44a3b1d30099629ee49b583532d250.1593180146.git.mchehab+huawei@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--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 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).