linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Vihas Mak <makvihas@gmail.com>
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	gregkh@linuxfoundation.org, martin@kaiser.cx,
	straube.linux@gmail.com, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: handle rtw_init_netdev_name() failure appropriately
Date: Tue, 18 Jan 2022 18:07:28 +0300	[thread overview]
Message-ID: <20220118150728.GJ1951@kadam> (raw)
In-Reply-To: <20220116192611.19224-1-makvihas@gmail.com>

On Mon, Jan 17, 2022 at 12:56:11AM +0530, Vihas Mak wrote:
> rtw_init_netdev_name() calls dev_alloc_name() which allocates the name
> for the device as per the given name format.
> It returns a negative err code if the format is invalid. Currently the
> name format is specified by the module parameter "ifname".
> Warn the user if "ifname" is invalid.
> 
> Signed-off-by: Vihas Mak <makvihas@gmail.com>
> ---

This doesn't really fix the bug.  Better to re-write the error handling.
See my error handling guide here:

https://lore.kernel.org/all/20210831084735.GL12231@kadam/

regards,
dan carpenter


  parent reply	other threads:[~2022-01-18 15:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16 19:26 [PATCH] staging: r8188eu: handle rtw_init_netdev_name() failure appropriately Vihas Mak
2022-01-16 21:47 ` Pavel Skripkin
2022-01-17  4:05   ` Vihas Mak
2022-01-18 15:07 ` Dan Carpenter [this message]
2022-01-20 12:28   ` Vihas Mak

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=20220118150728.GJ1951@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=makvihas@gmail.com \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.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;
as well as URLs for NNTP newsgroup(s).