diff options
author | Christoph Jaeger <email@christophjaeger.info> | 2014-08-04 14:54:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-08-16 12:23:12 -0700 |
commit | a7ae725c9295d9076c889bbb75f83cd8e053bfb6 (patch) | |
tree | e65a4df0340d425aa4bb8e8f37b682aba949313b /drivers/staging | |
parent | 4abc48d140e75bb07143287f3be3fa858b8e10f5 (diff) | |
download | blackbird-op-linux-a7ae725c9295d9076c889bbb75f83cd8e053bfb6.tar.gz blackbird-op-linux-a7ae725c9295d9076c889bbb75f83cd8e053bfb6.zip |
staging: ozwpan: Remove dead code
No need to return a value from elt_buf_init().
Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/ozwpan/ozeltbuf.c | 3 | ||||
-rw-r--r-- | drivers/staging/ozwpan/ozeltbuf.h | 2 | ||||
-rw-r--r-- | drivers/staging/ozwpan/ozpd.c | 5 |
3 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/ozwpan/ozeltbuf.c b/drivers/staging/ozwpan/ozeltbuf.c index bd560c67fc8c..f6e64817fb16 100644 --- a/drivers/staging/ozwpan/ozeltbuf.c +++ b/drivers/staging/ozwpan/ozeltbuf.c @@ -16,7 +16,7 @@ /* * Context: softirq-serialized */ -int oz_elt_buf_init(struct oz_elt_buf *buf) +void oz_elt_buf_init(struct oz_elt_buf *buf) { memset(buf, 0, sizeof(struct oz_elt_buf)); INIT_LIST_HEAD(&buf->stream_list); @@ -24,7 +24,6 @@ int oz_elt_buf_init(struct oz_elt_buf *buf) INIT_LIST_HEAD(&buf->isoc_list); buf->max_free_elts = 32; spin_lock_init(&buf->lock); - return 0; } /* diff --git a/drivers/staging/ozwpan/ozeltbuf.h b/drivers/staging/ozwpan/ozeltbuf.h index 03c12f57b9bb..384643272a43 100644 --- a/drivers/staging/ozwpan/ozeltbuf.h +++ b/drivers/staging/ozwpan/ozeltbuf.h @@ -50,7 +50,7 @@ struct oz_elt_buf { u8 tx_seq_num[OZ_NB_APPS]; }; -int oz_elt_buf_init(struct oz_elt_buf *buf); +void oz_elt_buf_init(struct oz_elt_buf *buf); void oz_elt_buf_term(struct oz_elt_buf *buf); struct oz_elt_info *oz_elt_info_alloc(struct oz_elt_buf *buf); void oz_elt_info_free(struct oz_elt_buf *buf, struct oz_elt_info *ei); diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 10f1b3ac8832..a27c6030e2f2 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -175,10 +175,7 @@ struct oz_pd *oz_pd_alloc(const u8 *mac_addr) oz_pd_set_state(pd, OZ_PD_S_IDLE); pd->max_tx_size = OZ_MAX_TX_SIZE; ether_addr_copy(pd->mac_addr, mac_addr); - if (0 != oz_elt_buf_init(&pd->elt_buff)) { - kfree(pd); - pd = NULL; - } + oz_elt_buf_init(&pd->elt_buff); spin_lock_init(&pd->tx_frame_lock); INIT_LIST_HEAD(&pd->tx_queue); INIT_LIST_HEAD(&pd->farewell_list); |