netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: netdev@vger.kernel.org
Subject: Re: net: qmi_wwan: bind to both control and data interface
Date: Fri, 22 Jun 2012 18:27:17 +0200	[thread overview]
Message-ID: <87395nl3bu.fsf@nemi.mork.no> (raw)
In-Reply-To: <20120622142534.GA19617@elgon.mountain> (Dan Carpenter's message of "Fri, 22 Jun 2012 17:25:34 +0300")

Dan Carpenter <dan.carpenter@oracle.com> writes:

> The patch 230718bda1be: "net: qmi_wwan: bind to both control and data 
> interface" from Jun 19, 2012, leads to the following Smatch warning:
> drivers/net/usb/qmi_wwan.c:206 qmi_wwan_bind()
> 	 error: potential NULL dereference 'cdc_union'.
>
> drivers/net/usb/qmi_wwan.c
>    205          /* verify CDC Union */
>    206          if (desc->bInterfaceNumber != cdc_union->bMasterInterface0) {
>                                               ^^^^^^^^^
>
> cdc_union is only non-NULL for USB_CDC_UNION_TYPE.  We used to check for
> NULL here but your patch removes the check.  I just want to verify that
> that was intended.
>
>    207                  dev_err(&intf->dev, "bogus CDC Union: master=%u\n", cdc_union->bMasterInterface0);
>    208                  goto err;
>    209          }
>    210  

Thanks for the notification, but this was intentional while touching the
code anyway.  The test always was redundant because the parsing code
ensure that cdc_union cannot be NULL at that point.


Bjørn

  reply	other threads:[~2012-06-22 16:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 14:25 net: qmi_wwan: bind to both control and data interface Dan Carpenter
2012-06-22 16:27 ` Bjørn Mork [this message]
2012-06-22 16:56   ` Dan Carpenter
2012-06-22 17:34     ` Bjørn Mork

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=87395nl3bu.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=dan.carpenter@oracle.com \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).