mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
driver: staging: csr: remove cast for kmalloc return value
remove cast for kmalloc return value. Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8dd4a96652
commit
f4309c0f14
5 changed files with 7 additions and 8 deletions
|
@ -1815,7 +1815,7 @@ udi_log_event(ul_client_t *pcli,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate log structure plus actual signal. */
|
/* Allocate log structure plus actual signal. */
|
||||||
logptr = (udi_log_t *)kmalloc(sizeof(udi_log_t) + total_len, GFP_KERNEL);
|
logptr = kmalloc(sizeof(udi_log_t) + total_len, GFP_KERNEL);
|
||||||
|
|
||||||
if (logptr == NULL) {
|
if (logptr == NULL) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
|
@ -1890,7 +1890,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate log structure plus actual signal. */
|
/* Allocate log structure plus actual signal. */
|
||||||
logptr = (udi_log_t *)kmalloc(sizeof(udi_log_t) + length, GFP_ATOMIC);
|
logptr = kmalloc(sizeof(udi_log_t) + length, GFP_ATOMIC);
|
||||||
if (logptr == NULL) {
|
if (logptr == NULL) {
|
||||||
unifi_error(priv, "Failed to allocate %d bytes for an SME message\n",
|
unifi_error(priv, "Failed to allocate %d bytes for an SME message\n",
|
||||||
sizeof(udi_log_t) + length);
|
sizeof(udi_log_t) + length);
|
||||||
|
|
|
@ -2365,7 +2365,7 @@ unifi_rx(unifi_priv_t *priv, CSR_SIGNAL *signal, bulk_data_param_t *bulkdata)
|
||||||
rx_buffered_packets_t *rx_q_item;
|
rx_buffered_packets_t *rx_q_item;
|
||||||
struct list_head *rx_list;
|
struct list_head *rx_list;
|
||||||
|
|
||||||
rx_q_item = (rx_buffered_packets_t *)kmalloc(sizeof(rx_buffered_packets_t),
|
rx_q_item = kmalloc(sizeof(rx_buffered_packets_t),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (rx_q_item == NULL) {
|
if (rx_q_item == NULL) {
|
||||||
unifi_error(priv, "%s: Failed to allocate %d bytes for rx packet record\n",
|
unifi_error(priv, "%s: Failed to allocate %d bytes for rx packet record\n",
|
||||||
|
|
|
@ -1031,8 +1031,7 @@ uf_glue_sdio_probe(struct sdio_func *func,
|
||||||
sdio_func_id(func), instance);
|
sdio_func_id(func), instance);
|
||||||
|
|
||||||
/* Allocate context */
|
/* Allocate context */
|
||||||
sdio_ctx = (CsrSdioFunction *)kmalloc(sizeof(CsrSdioFunction),
|
sdio_ctx = kmalloc(sizeof(CsrSdioFunction), GFP_KERNEL);
|
||||||
GFP_KERNEL);
|
|
||||||
if (sdio_ctx == NULL) {
|
if (sdio_ctx == NULL) {
|
||||||
sdio_release_host(func);
|
sdio_release_host(func);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -273,7 +273,7 @@ sme_native_log_event(ul_client_t *pcli,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate log structure plus actual signal. */
|
/* Allocate log structure plus actual signal. */
|
||||||
logptr = (udi_log_t *)kmalloc(sizeof(udi_log_t) + total_len, GFP_KERNEL);
|
logptr = kmalloc(sizeof(udi_log_t) + total_len, GFP_KERNEL);
|
||||||
|
|
||||||
if (logptr == NULL) {
|
if (logptr == NULL) {
|
||||||
unifi_error(priv,
|
unifi_error(priv,
|
||||||
|
|
|
@ -403,7 +403,7 @@ CsrResult enque_tx_data_pdu(unifi_priv_t *priv, bulk_data_param_t *bulkdata,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tx_q_item = (tx_buffered_packets_t *)kmalloc(sizeof(tx_buffered_packets_t), GFP_ATOMIC);
|
tx_q_item = kmalloc(sizeof(tx_buffered_packets_t), GFP_ATOMIC);
|
||||||
if (tx_q_item == NULL) {
|
if (tx_q_item == NULL) {
|
||||||
unifi_error(priv,
|
unifi_error(priv,
|
||||||
"Failed to allocate %d bytes for tx packet record\n",
|
"Failed to allocate %d bytes for tx packet record\n",
|
||||||
|
@ -3282,7 +3282,7 @@ void add_to_send_cfm_list(unifi_priv_t * priv,
|
||||||
{
|
{
|
||||||
tx_buffered_packets_t *send_cfm_list_item = NULL;
|
tx_buffered_packets_t *send_cfm_list_item = NULL;
|
||||||
|
|
||||||
send_cfm_list_item = (tx_buffered_packets_t *) kmalloc(sizeof(tx_buffered_packets_t), GFP_ATOMIC);
|
send_cfm_list_item = kmalloc(sizeof(tx_buffered_packets_t), GFP_ATOMIC);
|
||||||
|
|
||||||
if(send_cfm_list_item == NULL){
|
if(send_cfm_list_item == NULL){
|
||||||
unifi_warning(priv, "%s: Failed to allocate memory for new list item \n");
|
unifi_warning(priv, "%s: Failed to allocate memory for new list item \n");
|
||||||
|
|
Loading…
Reference in a new issue