diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-07-17 13:38:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-15 16:34:18 +0200 |
commit | eeed92c0c0829e63c04a9f2c0c1926a4a48f6c0a (patch) | |
tree | d19094302b1deab9201ab62ddd1e7f48cffa6583 /drivers | |
parent | 58043f2527fe012e48ce30a5386c9763c88e5dd3 (diff) | |
download | linux-stable-eeed92c0c0829e63c04a9f2c0c1926a4a48f6c0a.tar.gz linux-stable-eeed92c0c0829e63c04a9f2c0c1926a4a48f6c0a.tar.bz2 linux-stable-eeed92c0c0829e63c04a9f2c0c1926a4a48f6c0a.zip |
staging: ks7010: Delete unnecessary assignments for buffer variables
A few variables were assigned a null pointer despite of the detail
that they were immediately reassigned by the following statement.
Thus remove such unnecessary assignments.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/ks7010/ks7010_sdio.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 7da6c841e2cc..3622fba8fd36 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -711,7 +711,6 @@ static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index) int rc = 0; int retval; unsigned char *data_buf; - data_buf = NULL; data_buf = kmalloc(sizeof(u32), GFP_KERNEL); if (!data_buf) { @@ -743,7 +742,7 @@ static int ks7010_sdio_data_compare(struct ks_wlan_private *priv, u32 address, int rc = 0; int retval; unsigned char *read_buf; - read_buf = NULL; + read_buf = kmalloc(ROM_BUFF_SIZE, GFP_KERNEL); if (!read_buf) { rc = 1; @@ -776,8 +775,6 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv, int length; const struct firmware *fw_entry = NULL; - rom_buf = NULL; - /* buffer allocate */ rom_buf = kmalloc(ROM_BUFF_SIZE, GFP_KERNEL); if (!rom_buf) { |