From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christian Engelmayer <cengelma@gmx.at>
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, Jes.Sorensen@redhat.com,
Larry.Finger@lwfinger.net
Subject: Re: [PATCH 1/2] staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()
Date: Sat, 17 May 2014 17:44:23 +0300 [thread overview]
Message-ID: <20140517144423.GA15585@mwanda> (raw)
In-Reply-To: <1400323138-32243-2-git-send-email-cengelma@gmx.at>
On Sat, May 17, 2014 at 12:38:57PM +0200, Christian Engelmayer wrote:
> Function rtw_drv_init() is written in a way that assumes 'status' != _SUCCESS
> as long as not explicitly set. Thus initialize 'status' to FAIL, in order to
> prevent undefined behaviour if going through the exit paths. Detected by
> Coverity - CID 1077832.
>
> Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
This is a bugfix and we like to merge bugfixes without asking redo
things, so don't redo. But really the better fix is to get rid of the
status variable completely. Just return directly on the success path.
If we were to do that, then both patches would be merged together and
called: [patch] Staging: rtl8188eu: fix error handling in rtw_drv_init()
But this patch is also acceptable as-is. Thanks for fixing the bug. :)
regards,
dan carpenter
next prev parent reply other threads:[~2014-05-17 14:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-17 10:38 [PATCH 0/2] staging: rtl8188eu: fix Coverity defects in rtw_drv_init() Christian Engelmayer
2014-05-17 10:38 ` [PATCH 1/2] staging: rtl8188eu: fix usage of uninit scalar " Christian Engelmayer
2014-05-17 14:44 ` Dan Carpenter [this message]
2014-05-17 18:56 ` Christian Engelmayer
2014-05-17 19:24 ` Dan Carpenter
2014-05-17 10:38 ` [PATCH 2/2] staging: rtl8188eu: remove dead code " Christian Engelmayer
2014-05-17 11:36 ` [PATCH 0/2] staging: rtl8188eu: fix Coverity defects " Jes Sorensen
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=20140517144423.GA15585@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Jes.Sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=cengelma@gmx.at \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@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