summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
diff options
context:
space:
mode:
authorBingyu Zhou <rain.by.zhou@gmail.com>2017-04-19 19:47:41 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-28 12:32:14 +0200
commitea82fc151c5c092afb08a72289252c359ac88f45 (patch)
tree301d9a99999607a1efbd37c335144a824070cc77 /drivers/staging/rtl8723bs/os_dep/sdio_intf.c
parent3292bae3b4b6ca392a3f40fcb8135ed9b55206ed (diff)
staging: rtl8723bs: Fix assignment in if condition in os_dep/sdio_intf.c
ERROR: do not use assignment in if condition Detected by scripts/checkpatch.pl -f Signed-off-by: Bingyu Zhou <rain.by.zhou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/os_dep/sdio_intf.c')
-rw-r--r--drivers/staging/rtl8723bs/os_dep/sdio_intf.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index b0da06307fdf..d2fb489d2e83 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -258,7 +258,8 @@ static struct dvobj_priv *sdio_dvobj_init(struct sdio_func *func)
struct dvobj_priv *dvobj = NULL;
PSDIO_DATA psdio;
- if ((dvobj = devobj_init()) == NULL) {
+ dvobj = devobj_init();
+ if (dvobj == NULL) {
goto exit;
}
@@ -336,7 +337,8 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
struct adapter *padapter = NULL;
PSDIO_DATA psdio = &dvobj->intf_data;
- if ((padapter = (struct adapter *)vzalloc(sizeof(*padapter))) == NULL) {
+ padapter = (struct adapter *)vzalloc(sizeof(*padapter));
+ if (padapter == NULL) {
goto exit;
}
@@ -481,18 +483,21 @@ static int rtw_drv_init(
struct adapter *if1 = NULL, *if2 = NULL;
struct dvobj_priv *dvobj;
- if ((dvobj = sdio_dvobj_init(func)) == NULL) {
+ dvobj = sdio_dvobj_init(func);
+ if (dvobj == NULL) {
RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("initialize device object priv Failed!\n"));
goto exit;
}
- if ((if1 = rtw_sdio_if1_init(dvobj, id)) == NULL) {
+ if1 = rtw_sdio_if1_init(dvobj, id);
+ if (if1 == NULL) {
DBG_871X("rtw_init_primarystruct adapter Failed!\n");
goto free_dvobj;
}
/* dev_alloc_name && register_netdev */
- if ((status = rtw_drv_register_netdev(if1)) != _SUCCESS) {
+ status = rtw_drv_register_netdev(if1);
+ if (status != _SUCCESS) {
goto free_if2;
}