public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista•com>
To: Filip Aben <f.aben@option•com>
Cc: davem@davemloft•net, linux-usb@vger•kernel.org,
	netdev@vger•kernel.org, jhovold@gmail•com, pki@ex•com.pl,
	j.dumon@option•com
Subject: Re: [PATCH] hso: fix disable_net
Date: Thu, 25 Nov 2010 15:17:58 +0300	[thread overview]
Message-ID: <4CEE53F6.8070906@ru.mvista.com> (raw)
In-Reply-To: <1290627352.1739.19.camel@filip-linux>

On 24-11-2010 22:35, Filip Aben wrote:

> The HSO driver incorrectly creates a serial device instead of a net
> device when disable_net is set. It shouldn't create anything for the
> network interface.

> Signed-off-by: Filip Aben <f.aben@option•com>
> ---

> diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
> index b154a94..b05c235 100644
> --- a/drivers/net/usb/hso.c
> +++ b/drivers/net/usb/hso.c
> @@ -2994,10 +2994,10 @@ static int hso_probe(struct usb_interface *interface,
>
>   	case HSO_INTF_BULK:
>   		/* It's a regular bulk interface */
> -		if (((port_spec&  HSO_PORT_MASK) == HSO_PORT_NETWORK)&&
> -		    !disable_net)
> +		if ((port_spec&  HSO_PORT_MASK) == HSO_PORT_NETWORK) {
> +		    if(!disable_net)
>   			hso_dev = hso_create_net_device(interface, port_spec);
> -		else
> +		} else

    There should now be {} on the *else* branch too, according to CodingStyle.

>   			hso_dev =
>   			    hso_create_bulk_serial_device(interface, port_spec);
>   		if (!hso_dev)

WBR, Sergei

  parent reply	other threads:[~2010-11-25 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 19:35 [PATCH] hso: fix disable_net Filip Aben
2010-11-25 12:16 ` Sergei Shtylyov
2010-11-25 12:17 ` Sergei Shtylyov [this message]
2010-11-25 12:52 ` Johan Hovold

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=4CEE53F6.8070906@ru.mvista.com \
    --to=sshtylyov@mvista$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=f.aben@option$(echo .)com \
    --cc=j.dumon@option$(echo .)com \
    --cc=jhovold@gmail$(echo .)com \
    --cc=linux-usb@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pki@ex$(echo .)com.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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