Commit Graph

10 Commits

Author SHA1 Message Date
Gustavo A. R. Silva a14731129a staging: r8822be: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18 16:21:26 +02:00
Greg Kroah-Hartman 1236d6bb6e Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-09 09:02:35 +02:00
Arvind Yadav 302985467f staging: rtlwifi: pr_err() strings should end with newlines
pr_err() messages should end with a new-line to avoid other messages
being concatenated.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03 18:36:25 +02:00
Georgiana Chelu ee0dd523bc Staging: rtlwifi: halmac: Remove unnecessary 'out of memory' messages
Remove unnecessary messages because OOM (Out Of Memory Manager)
reports memory allocation fail messages. The return value
is clear regarding the problem, so there is no need for the
'out of memory' comments. Also, delete braces {} for single
if statement blocks to improve the coding style.

Fix issues found by by checkpatch.pl.
WARNING: Possible unnecessary 'out of memory' message.
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Georgiana Chelu <georgiana.chelu93@example.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-22 10:53:45 +02:00
Colin Ian King e1bf28868a staging: r8822be: fix null pointer dereferences with a null driver_adapter
The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null
pointer deference on a null driver_adapter.  Fix this by assigning
driver_adapter earlier to halmac_adapter->driver_adapter before the tracing
call so that a non-null driver_adapter is passed instead.

I should have spotted these with an earlier patch I sent, but I overlooked
these in the rather large CoverityScan logs.

Detected by CoverityScan, CID#1454550, CID#1454554, CID#1454565,
CID#1454591, CID#1454598 ("Explicit null dereferenced")

Fixes: 938a0447f0 ("staging: r8822be: Add code for halmac sub-driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18 12:25:31 +02:00
Colin Ian King 1919b0562b staging: r8822be: fix null pointer dereference with a null driver_adapter
The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null
pointer deference on the null driver_adapter.  Fix this by assigning
driver_adapter earlier to halmac_adapter->driver_adapter before the tracing
call so that a non-null driver_adapter is passed instead.

Detected by CoverityScan, CID#1454613 ("Explicit null dereferenced")

Fixes: 938a0447f0 ("staging: r8822be: Add code for halmac sub-driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-28 10:27:28 +02:00
Colin Ian King 2ffabf50bd staging: r8822be: fix memory leak of eeprom_map on error exit return
A memory leak of eeprom_map occurs if the call to halmac_eeprom_parser_88xx
fails. Fix this by kfree'ing it before returning.

Detected by CoverityScan, CID#1454569 ("Resource leak")
Fixes: 938a0447f0 ("staging: r8822be: Add code for halmac sub-driver")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-28 10:27:28 +02:00
Himanshu Jha 3687994a03 staging: r8822be: remove unnecessary call to memset
call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.

Build and tested it.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-27 19:59:10 +02:00
Colin Ian King f942efe73a staging: r8822be: fix a couple of spelling mistakes
Trivial fixes to spelling mistake in pr_err error messages:

errorr -> error
mismactch -> mismatch

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-22 18:36:14 -07:00
Ping-Ke Shih 938a0447f0 staging: r8822be: Add code for halmac sub-driver
The RTL8822BE, an 802.11ac wireless network card, is now appearing in
new computers. Its driver is being placed in staging to reduce the time
that users of this new card will have access to in-kernel drivers.

New Realtek devices implement a common sub-driver to control the MAC
layer. The RTL8822BE is the first of these devices, thus its introduction
involves some extra code. In the wireless tree, this will be a separate
module; however, it is compiled into the 8822be driver here.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-20 11:13:12 -07:00