summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlan-ng
diff options
context:
space:
mode:
authorNicholas Sim <nicholassimws@gmail.com>2016-04-05 17:37:12 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-29 17:43:15 -0700
commit02e020480daf3a7726db493ff28f9391ff6bb9c4 (patch)
tree7dc8663c1dffb7e263b111644616d889d80b223e /drivers/staging/wlan-ng
parent9f563f1a2a4b448393159b3d526a6657dc4c0fce (diff)
downloadtalos-obmc-linux-02e020480daf3a7726db493ff28f9391ff6bb9c4.tar.gz
talos-obmc-linux-02e020480daf3a7726db493ff28f9391ff6bb9c4.zip
staging: wlan-ng: rewrite NULL comparison
It is not necessary to compare explicitly to NULL. Rewrite if condition as (!dev) or (dev) as suggested in Documentation/CodingStyle Signed-off-by: Nicholas Sim <nicholassimws@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r--drivers/staging/wlan-ng/hfa384x_usb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 21a92df85931..337810750f2b 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -614,7 +614,7 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void)
ctlx = kzalloc(sizeof(*ctlx),
in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
- if (ctlx != NULL)
+ if (ctlx)
init_completion(&ctlx->done);
return ctlx;
@@ -797,7 +797,7 @@ static inline struct usbctlx_completor *init_rmem_completor(
----------------------------------------------------------------*/
static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
{
- if (ctlx->usercb != NULL) {
+ if (ctlx->usercb) {
hfa384x_cmdresult_t cmdresult;
if (ctlx->state != CTLX_COMPLETE) {
@@ -2738,7 +2738,7 @@ static void hfa384x_usbctlx_completion_task(unsigned long data)
/* Call the completion function that this
* command was assigned, assuming it has one.
*/
- if (ctlx->cmdcb != NULL) {
+ if (ctlx->cmdcb) {
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
ctlx->cmdcb(hw, ctlx);
spin_lock_irqsave(&hw->ctlxq.lock, flags);
@@ -3629,7 +3629,7 @@ static void hfa384x_ctlxout_callback(struct urb *urb)
dbprint_urb(urb);
#endif
if ((urb->status == -ESHUTDOWN) ||
- (urb->status == -ENODEV) || (hw == NULL))
+ (urb->status == -ENODEV) || !hw)
return;
retry:
OpenPOWER on IntegriCloud