All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: maxime.ripard@free-electrons.com
Cc: dri-devel@lists.freedesktop.org
Subject: re: drm: sun4i: Add composite output
Date: Thu, 12 May 2016 12:59:06 +0300	[thread overview]
Message-ID: <20160512095906.GA10497@mwanda> (raw)

Hello Maxime Ripard,

The patch 03c4c71d25b4: "drm: sun4i: Add composite output" from Oct
29, 2015, leads to the following static checker warning:

	drivers/gpu/drm/sun4i/sun4i_tv.c:513 sun4i_tv_comp_get_modes()
	error: potential null dereference 'mode'.  (drm_mode_create returns null)

drivers/gpu/drm/sun4i/sun4i_tv.c
   505  static int sun4i_tv_comp_get_modes(struct drm_connector *connector)
   506  {
   507          int i;
   508  
   509          for (i = 0; i < ARRAY_SIZE(tv_modes); i++) {
   510                  struct drm_display_mode *mode = drm_mode_create(connector->dev);
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   511                  struct tv_mode *tv_mode = &tv_modes[i];
   512  
   513                  strcpy(mode->name, tv_mode->name);
                               ^^^^^^^^^^
   514  
   515                  sun4i_tv_mode_to_drm_mode(tv_mode, mode);
   516                  drm_mode_probed_add(connector, mode);
   517          }
   518  
   519          return i;
   520  }

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

                 reply	other threads:[~2016-05-12  9:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20160512095906.GA10497@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maxime.ripard@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.