From: Matthias Beyer Date: Fri, 23 May 2014 20:23:41 +0000 (+0200) Subject: Staging: bcm: Shortened lines in get_dsx_sf_data_to_application() X-Git-Tag: next-20140530~19^2~303 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=15bba866c775baf236c5a6ee4d4aeb1edd48681e;p=karo-tx-linux.git Staging: bcm: Shortened lines in get_dsx_sf_data_to_application() Signed-off-by: Matthias Beyer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 16262bbc5c23..3d8c04912739 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1831,22 +1831,29 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* = NO_OF_QUEUES) { - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SFID %d not present in queue !!!", uiSFId); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, + "SFID %d not present in queue !!!", uiSFId); return -EINVAL; } - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "status =%d", status); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, + "status =%d", status); psSfInfo = &Adapter->PackInfo[status]; - if (psSfInfo->pstSFIndication && copy_to_user(user_buffer, - psSfInfo->pstSFIndication, sizeof(struct bcm_add_indication_alt))) { - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "copy to user failed SFID %d, present in queue !!!", uiSFId); + if (psSfInfo->pstSFIndication + && copy_to_user(user_buffer, psSfInfo->pstSFIndication, + sizeof(struct bcm_add_indication_alt))) { + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, + "copy to user failed SFID %d, present in queue !!!", + uiSFId); status = -EFAULT; return status; }