1
0
Fork 0
Commit Graph

518855 Commits (09e0b2ff32538a032936631ad9c110c42fab7f26)

Author SHA1 Message Date
Paul Gortmaker 09e0b2ff32 rtl8192u: delete another embedded instance of generic reason codes
We have global copies of all these reason codes.  We don't need local
copies.  Worse is that these seem totally unused; a grep for some of
the fields comes up empty, and it still compiles after its complete
removal.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:15 +02:00
Paul Gortmaker db2616199e rtl8192u: don't duplicate ieee80211 constants for status/auth/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

In switching to <linux/ieee80211.h> we have to delete a local copy of
an identical struct that we prepped earlier to have identical field
names, and we add explicit include <...> where needed in order to
preserve getting a successful compile.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:14 +02:00
Paul Gortmaker 7c6e3f24c3 rtl8192u: align local ieee80211_wmm_ac_param struct fields with global
The <linux/ieee80211.h> and this local file both have a struct of the
same name.  They also have the same field sizes and generally the
same fields, as can be seen here:

   ~/git/linux-head$ git grep -A4 'struct ieee80211_wmm_ac_param {'
   drivers/staging/rtl8192u/ieee80211/ieee80211.h:struct ieee80211_wmm_ac_param {
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_aci_acm_aifsn;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_ecwmin_ecwmax;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u16 ac_txop_limit;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h-};
   --
   include/linux/ieee80211.h:struct ieee80211_wmm_ac_param {
   include/linux/ieee80211.h-      u8 aci_aifsn; /* AIFSN, ACM, ACI */
   include/linux/ieee80211.h-      u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */
   include/linux/ieee80211.h-      __le16 txop_limit;
   include/linux/ieee80211.h-} __packed;
   ~/git/linux-head$

Here we just align the local field names with the main system one.  Then
we can add an include of the system one and delete the local copy in one
smooth step in a follow-on commit.

Not that the replacement:

 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_aci_acm_aifsn/aci_aifsn/g' $i ; done
 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_ecwmin_ecwmax/cw/g' $i ; done
 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_txop_limit/txop_limit/g' $i ; done

implicitly shows that only one of the three fields is currently used.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:14 +02:00
Paul Gortmaker d140d6a15b rtl8192u: promote auth_mode to a full 8 bits
Currently LEAP is defined to two locally but the identically named
global constant is 128 in <linux/ieee80211.h>.  In order for us to
switch over to using the global value, we need to adjust the local
storage which is currently not enough to hold the larger value.

This is now consistent with the similar struct used in
drivers/net/wireless/ipw2x00/libipw.h and other drivers.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:14 +02:00
Paul Gortmaker 5c2918a5ba rtl8192u: don't trample on <linux/ieee80211.h> struct namespace
In order to start reducing the duplicated code/constants/macros in this
driver, we need to include <linux/ieee80211.h> to provide the defacto
versions.  However this driver has structs with the same name as the
ones in the main include, so namespace collision prevents us from doing
step #1.

Since the structs actually differ in their respective fields, we can't
simply delete the local ones without impacting the runtime; a conversion
to use the global ones can be considered at a later date if desired.

Rename the ones here with a vendor specific prefix so that we won't have
the namespace collision, and hence can continue on with the cleanup.

Automated conversion done with:

    for i in `find . -name '*.[ch]'` ; do \
      sed -i 's/struct ieee80211_hdr/struct rtl_80211_hdr/g' $i ; \
    done

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:13 +02:00
Paul Gortmaker f9c40f143c rtl8712: don't duplicate ieee80211 constants for status/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

It seems that ieee80211 was already included everywhere it was needed,
since no explicit include <...> were needed to be added in order to
preserve getting a successful compile.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:13 +02:00
Paul Gortmaker 04fbf979b3 rtl8188eu: don't duplicate ieee80211 constants for status/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

Note that a couple of them had slight wording differences, things like
INVALID vs. NOT_VALID or similar, so they are aligned with the global
naming conventions here, as dictated by compile testing.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:13 +02:00
Guillaume Brogi d4855fe18e staging: vt6655: Checkpatch fix: lines longer than 80 columns
This patch fixes lines longer than 80 columns in mac.c.
5 lines longer than 80 columns remain for the sake of readability.

Signed-off-by: Guillaume Brogi <gui-gui@netcourrier.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:12 +02:00
Sudip Mukherjee d8496fb493 staging: sm7xxfb: remove unused functions
removed the smtc_alloc_fb_info() and smtc_free_fb_info() functions which
were not used anymore.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:12 +02:00
Sudip Mukherjee cd14ad8be7 staging: sm7xxfb: use framebuffer_alloc and release
use the standard framebuffer_alloc() and framebuffer_release() instead
of custom defined function. for making that change we had to change a
member of the private structure from a variable to pointer and had to
touch almost all places of the file. since fb was changed into a pointer
so all instance of "sfb->fb." has been changed into "sfb->fb->".
now we will get build warning about smtc_alloc_fb_info() and
smtc_free_fb_info() to be unused which will be removed in the next
patch of the series.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:12 +02:00
Gujulan Elango, Hari Prasath (H.) cf376ec0ee staging: gsc_hdpi: Remove dead code
This patch removes commented code from this driver.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:12 +02:00
Gujulan Elango, Hari Prasath (H.) 2b9a9d49b3 staging: fsl-mc: Remove redundant initalization of the .owner field
This patch removes the redundant static initialization of the .owner field from
this driver as it is being overidden by the call from the platform driver register

Signed-off-by: Hari Prasath <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:11 +02:00
Binbin Zhou 6c20d83b3d staging: sm750: Fix the Makefile option error
The sm750fb's Kconfig option is CONFIG_FB_SM750, not CONFIG_FB_SM7XX.
Thus fix it to make the sm750fb can be built successfully.

Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
Reviewed-by: Huacai Chen <chenhc@@lemote.com>
Acked-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:11 +02:00
Luca Ceresoli 4b248ab2dd staging: rtl8188eu: remove commented code
This code is commented since the initial commit. Probably it is a remnant of
old code.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:11 +02:00
Luca Ceresoli 2f13617a35 staging: rtl8188eu: remove useless comment
"step 2" does mean much as there is no "step 1" stated anywhere...

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:10 +02:00
Luca Ceresoli 471450531c staging: rtl8188eu: fix lines over 80 characters
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:10 +02:00
Luca Ceresoli 6c4743f7d6 staging: rtl8188eu: simplify nested ifs
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:10 +02:00
Luca Ceresoli 2ff4e79f0e staging: rtl8188eu: document enum where it is declared
The comment "/* open system */" is repeated verbatim in several places where
dot11AuthAlgrthm_Open is referenced, but not where it is declared.

Move it to be only at its declaration.

This also fixes some "line over 80 characters" checkpatch warnings.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:09 +02:00
Luca Ceresoli 22a1279b84 staging: rtl8188eu: fix comments over 80 characters
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:09 +02:00
Luca Ceresoli 3446ef56f8 staging: rtl8188eu: remove duplicated comments
There are identical comments near the static variable declaration, around
lines 118~120.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:09 +02:00
Edward Lipinsky 95829dcbee Staging: rtl8723au: hal: Remove trailing whitespace in odm.c
This patch fixes the checkpatch.pl error:

ERROR: trailing whitespace

Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:09 +02:00
Wei Yongjun ec80e24280 staging: dt3155v4l: remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:08 +02:00
Phong Tran 81fb0b9013 staging: android: ion_test: unregister the platform device
The driver has to unregister from platform device when it's unloaded

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:08 +02:00
Phong Tran 954c2d8f98 staging: android: ion_test: unregister the misc device
Add the remove() method for deregister from misc device
when it's unloaded.

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:08 +02:00
Mateusz Kulikowski a569f22007 staging: rtl8192e: Fix DeviceID in rtl8192_pci_findadapter()
rtl8192_pci_findadapter() was looking for invalid DeviceID (0x8172),
instead of proper for rtl8192e/se devices (0x8192)

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:07 +02:00
Mateusz Kulikowski eae10b8ea5 staging: rtl8192e: Fix DEEP_INDENTATION warnings in rtl_dm.c
Separate parts of dm_TXPowerTrackingCallback_TSSI() into two new functions:
- dm_tx_update_tssi_weak_signal()
- dm_tx_update_tssi_strong_signal()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:07 +02:00
Mateusz Kulikowski fbb052f9fe staging: rtl8192e: Fix DEEP_INDENTATION warnings in rtllib_parse_info_param()
- Replace ?: with min_t
- Remove condition that is always true

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:07 +02:00
Mateusz Kulikowski 867ebbaebc staging: rtl8192e: Fix LINE_SPACING warning
Trivial fix - add newline in dm_InitializeTXPowerTracking_TSSI()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:06 +02:00
Mateusz Kulikowski 20b7ec0990 staging: rtl8192e: Remove bb tx gains from r8192_priv
r8192_priv structure had 2 big arrays with tx gain register values:
- cck_txbbgain_table
- cck_txbbgain_ch14_table
- txbbgain_table

This arrays were read-only - filled in driver init code and look
like firmware/chip-specific.

This patch removes them from r8192_priv and puts them in (global) variables.

tx_bb_gain is also flattened - register values are stored in array;
Amplification value can be calculated using dm_tx_bb_gain_idx_to_amplify().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:06 +02:00
Mateusz Kulikowski f669228512 staging: rtl8192e: Fix SPACING errors
Fix several SPACING errors to make checkpatch happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:06 +02:00
Mateusz Kulikowski aedd45dfd2 staging: rtl8192e: remove r819xE_phyreg.h
This file is not used and its contents are duplicated in r8192E_phyreg.h.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:06 +02:00
Mateusz Kulikowski 27a3071c6d staging: rtl8192e: Copy comments from r819XE_phyreg.h to r8192E_phyreg.h
Both files have the same contents (with the exception of comments).
One of them will not survive future commits.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:05 +02:00
Mateusz Kulikowski 7b7b0c9bbc staging: rtl8192e: Fix SPACE_BEFORE_TAB warnings
Reformat r8192E_phyreg.h to make checkpatch happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:05 +02:00
Nickolaus Woodruff bdc01d5711 staging: rtl8192u: Make core functions static
This patch fixes the following sparse warnings in r8192U_core.c:

  CHECK   drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/rtl8192u/r8192U_core.c:3212:6: warning: symbol
'rtl819x_watchdog_wqcallback' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3276:6: warning: symbol
'watch_dog_timer_callback' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3282:5: warning: symbol
'_rtl8192_up' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3333:5: warning: symbol
'rtl8192_close' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3406:6: warning: symbol
'rtl8192_restart' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4618:6: warning: symbol
'rtl8192_irq_rx_tasklet' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4736:6: warning: symbol
'rtl8192_cancel_deferred_work' was not declared. Should it be static?

Signed-off-by: Nickolaus Woodruff <nickolauswoodruff@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:05 +02:00
Ian Abbott 3ad9470341 staging: comedi: mite: use a better MODULE_DESCRIPTION()
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:04 +02:00
Ian Abbott f2348c7369 staging: comedi: mite.h: whitespace changes in function declarations
Reformat some function declarations to avoid bunching up near column 80.

Also add a blank line after a `struct` definition.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:04 +02:00
Ian Abbott 65f6fac914 staging: comedi: mite.c: reformat comments
Use the usual style for block comments.  Squash double spaces after
comment opening sequences.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:03 +02:00
Ian Abbott f751a0d503 staging: comedi: mite.h: reformat some comments
Use the usual style for block comments.  Squash double spaces after
comment opening sequences.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:03 +02:00
Ian Abbott c95f212de8 staging: comedi: mite.h: remove "../comedi_pci.h" and make self-reliant
"mite.h" relies on a lot of things declared including "../comedi_pci.h",
but doesn't need anything in "../comedi_pci.h" itself.  None of the
Comedi modules that include "mite.h" rely on it to include
"../comedi_pci.h" on their behalf.

Remove the inclusion of "../comedi_pci.h" from "mite.h", and add enough
other includes and (incomplete) `struct` declarations to make it compile
without warnings or errors even when included first in a .c file.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:03 +02:00
Ian Abbott c0cb606a34 staging: comedi: mite.c: remove commented out USE_KMALLOC
The definition of the macro `USE_KMALLOC` is commented out, and nothing
refers to it.  Remove the commented out macro.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:02 +02:00
Ian Abbott 5f7c682226 staging: comedi: mite.h: remove PCIMIO_COMPAT
The macro `PCIMIO_COMPAT` is defined, but never used.  Remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:02 +02:00
Ian Abbott 272b1ae578 staging: comedi: mite: move #include <linux/slab.h>
The Comedi driver modules build fine if the inclusion of <linux/slab.h>
is removed from "mite.h", so remove it.  However, since "mite.c" calls
`kzalloc()`, include <linux/slab.h> there.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:02 +02:00
Giedrius Statkevičius eef94f6b7b staging: dgnc: remove redundant check
count doesn't get changed in between identical checks in
dgnc_tty_write() so remove the second check

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:01 +02:00
Giedrius Statkevičius a74d8e2167 staging: dgnc: remove dead code in dgnc_tty_write()
Remove the dead code protected by in_user in dgnc_tty_write() because it
is set to 0 and never changed to 1 thus the code in ifs never gets
executed.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:01 +02:00
Mitchel Humpherys dc44f4e17c staging: ion: chunk_heap: use pr_debug for heap creation print
We're currently printing to the kernel log at `info' level when we
successfully create the chunk heap, but success messages should be done
at `debug' level.  Fix this.

Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:01 +02:00
Giedrius Statkevičius 071494d832 staging: dgnc: remove redundant !ch checks
Remove checks that are redundant since we don't have boards with partially
initialized ->channels[i].

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:00 +02:00
Giedrius Statkevičius ce2927e9a3 staging: dgnc: don't forget to check if ->channels[i] is NULL in dgnc_tty_uninit()
Add a check if ->channels[i] is NULL because a NULL pointer may be dereferenced
in case one of the allocations failed

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:00 +02:00
Giedrius Statkevičius fa52d96c3e staging: dgnc: clean up allocation of ->channels[i]
Check if kzalloc fails in dgnc_tty_init() and if it does then free all
previously allocated ->channels[i] and set them to NULL. This makes the code
less error/bug prone because instead of needing programmers attention to add
checks everywhere we do that in one place. Also, remove a bogus comment and
check in the same loop because ->channels[i] isn't allocated anywhere else.
Finally, remove a unnecessary check if ->channels[i] is NULL in the next loop
because it can't be.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:00 +02:00
Robin Karlsson 258f6a5005 Staging: sm750fb: Fix spelling error in TODO
Fixed spelling error in TODO.

Signed-off-by: Robin Karlsson <s.r.karlsson@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:23:59 +02:00
Amitoj Kaur Chawla 31296ba5c0 Staging: sm750fb: Remove space after parenthesis
Fixed error by removing space after open parenthesis '('
Problem found using checkpatch.pl
ERROR: space prohibited after that open parenthesis '('

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:23:59 +02:00