public inbox for linux-aspeed@lists.ozlabs.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [bug report] pinctrl: aspeed: Improve debug output
Date: Mon, 7 Feb 2022 15:41:07 +0300	[thread overview]
Message-ID: <20220207124107.GA19955@kili> (raw)

Hello Andrew Jeffery,

This is a semi-automatic email about new static checker warnings.

The patch aa639e443704: "pinctrl: aspeed: Improve debug output" from
Jul 1, 2020, leads to the following Smatch complaint:

    ./drivers/pinctrl/aspeed/pinctrl-aspeed.c:241 aspeed_pinmux_set_mux()
    warn: variable dereferenced before check 'pdesc' (see line 239)

./drivers/pinctrl/aspeed/pinctrl-aspeed.c
   238	
   239			pr_debug("Muxing pin %s for %s\n", pdesc->name, pfunc->name);
                                                           ^^^^^^^^^^^
Dereference

   240	
   241			if (!pdesc)
                             ^^^^^
Checked too late.

   242				return -EINVAL;
   243	

regards,
dan carpenter

                 reply	other threads:[~2022-02-07 12:41 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=20220207124107.GA19955@kili \
    --to=dan.carpenter@oracle.com \
    --cc=linux-aspeed@lists.ozlabs.org \
    /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