From: Petri Latvala <petri.latvala@intel.com>
To: Simon Ser <simon.ser@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_3d: fix uninitialized value
Date: Thu, 29 Aug 2019 14:03:33 +0300 [thread overview]
Message-ID: <20190829110333.GD4019@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20190829103745.28877-1-simon.ser@intel.com>
On Thu, Aug 29, 2019 at 01:37:45PM +0300, Simon Ser wrote:
> If the device doesn't have any HDMI connectors, garbage is read from the stack.
>
> Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
> ---
> tests/kms_3d.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/tests/kms_3d.c b/tests/kms_3d.c
> index b970b3b5521c..2622b2d0a6f3 100644
> --- a/tests/kms_3d.c
> +++ b/tests/kms_3d.c
> @@ -30,7 +30,7 @@ igt_simple_main
> {
> int drm_fd;
> drmModeRes *res;
> - drmModeConnector *connector;
> + drmModeConnector *connector = NULL;
> const struct edid *edid;
> int mode_count, connector_id;
>
> @@ -43,14 +43,10 @@ igt_simple_main
>
> /* find an hdmi connector */
> for (int i = 0; i < res->count_connectors; i++) {
> -
> connector = drmModeGetConnectorCurrent(drm_fd, res->connectors[i]);
> -
> if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA)
> break;
> -
> drmModeFreeConnector(connector);
> -
> connector = NULL;
> }
> igt_require(connector);
> --
> 2.23.0
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-08-29 11:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 10:37 [igt-dev] [PATCH i-g-t] tests/kms_3d: fix uninitialized value Simon Ser
2019-08-29 11:03 ` Petri Latvala [this message]
2019-08-29 12:34 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-08-30 1:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20190829110333.GD4019@platvala-desk.ger.corp.intel.com \
--to=petri.latvala@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=simon.ser@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