lkml.org 
[lkml]   [2017]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 4/4] ueagle-atm: Adjust three checks for null pointers
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 19 May 2017 19:29:08 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The script “checkpatch.pl” pointed information out like the following.

Comparison to NULL could be written !…

Thus fix the affected source code places.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/usb/atm/ueagle-atm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index 0ca4ff3e6683..5c9517bfb82c 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -955,7 +955,7 @@ static void uea_load_page_e1(struct work_struct *work)
sc->dsp_firm = NULL;
}

- if (sc->dsp_firm == NULL && request_dsp(sc) < 0)
+ if (!sc->dsp_firm && request_dsp(sc) < 0)
return;

p = sc->dsp_firm->data;
@@ -1076,7 +1076,7 @@ static void uea_load_page_e4(struct work_struct *work)
sc->dsp_firm = NULL;
}

- if (sc->dsp_firm == NULL && request_dsp(sc) < 0)
+ if (!sc->dsp_firm && request_dsp(sc) < 0)
return;

p = (struct l1_code *) sc->dsp_firm->data;
@@ -1596,7 +1596,7 @@ static void cmvs_file_name(struct uea_softc *sc, char *const cmv_name, int ver)

kernel_param_lock(THIS_MODULE);
/* set proper name corresponding modem version and line type */
- if (cmv_file[sc->modem_index] == NULL) {
+ if (!cmv_file[sc->modem_index]) {
if (UEA_CHIP_VERSION(sc) == ADI930)
file_arr[3] = '9';
else if (UEA_CHIP_VERSION(sc) == EAGLE_IV)
--
2.13.0
\
 
 \ /
  Last update: 2017-05-19 19:53    [W:0.043 / U:7.656 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site