Commit graph

11 commits

Author SHA1 Message Date
Cihangir Akturk e010a2a04c staging: gdm724x: fix misplaced open braces
This patch fixes the following checkpatch.pl issues in gdm_usb.c:
ERROR: that open brace { should be on the previous line

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-26 19:26:46 -07:00
Kiran Padwal aa92015987 Staging: gdm724x: gdm_usb.c: fix missing blank line after variable declaration
Checkpatch fix - Add missing blank line after variable declaration

Signed-off-by: Kiran Padwal <kiran.padwal21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:47:19 -07:00
Alexey Khoroshilov 22505b258b staging: gdm724x: fix leak at failure path in init_usb()
If an allocation in init_usb() failed, it returns without
deallocation of already allocated resources.

The patch fix it and replaces GFP_ATOMIC by GFP_KERNEL in
alloc_tx_sdu_struct() and alloc_rx_struct() as long as
they are called from probe only.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:33:49 -07:00
Aybuke Ozdemir 35db0350c5 staging: gdm724x: gdm_usb.c: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in gdm_usb.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 19:49:00 -07:00
Dan Carpenter 75bc5fad15 staging: gdm724x: cleanup alloc_tx_sdu_struct()
The kfree(t_sdu->buf) sets off a private static checker warning because
"t_sdu->buf" is always NULL.

This function just allocates two pointers so we can re-write it to be
simpler.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18 11:16:56 -08:00
Alexey Khoroshilov a34c72b348 staging: gdm724x: fix leak at failure path in gdm_usb_probe()
Error handling code in gdm_usb_probe() deallocates all resources,
but calls usb_get_dev(usbdev) and returns error code after that.

The patch fixes it and, by the way, several other issues:
- no need to use GFP_ATOMIC in probe();
- return -ENODEV instead of -1;
- kmalloc+memset -> kzalloc

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:29:15 -08:00
Teodora Baluta 1f5586475d staging: gdm724x: kzalloc should be used instead of kmalloc/memset
This patch fixes the following coccinelle warnings in driver gdm724x:

drivers/staging/gdm724x/gdm_usb.c:127:9-16: WARNING: kzalloc should be used for t_sdu, instead of kmalloc/memset
drivers/staging/gdm724x/gdm_usb.c:91:5-12: WARNING: kzalloc should be used for t, instead of kmalloc/memset

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 20:34:46 -07:00
Won Kang 9c02d0dbde staging: gdm724x: Modified function name conflict set_endian
Conflict resolution for function name set_endian when building for powerpc
The name changed to gdm_set_endian

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29 11:29:37 -07:00
Sachin Kamat 649bf7f98b staging: gdm724x: Remove version.h header inclusion in gdm_usb.c
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25 12:11:58 -07:00
Joe Perches 0ec473b526 staging: gdm724x: Update logging
Make the logging prefixes match the module names
by adding #define pr_fmt(fmt) KBUILD_MODNAME and
converting printks to netdev_<level> when a
struct netdevice * is available and and pr_<level>
when not.

Remove embedded prefixes.
Add missing terminating newlines.
Remove an unnecessary rx-dropped message.
Remove an unnecessary temporary variable.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-24 15:11:20 -07:00
Won Kang 61e1210476 staging: gdm7240: adding LTE USB driver
GCT Semiconductor GDM7240 is 4G LTE chip.
This driver supports GCT reference platform as a USB device.

Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-24 13:09:44 -07:00