[PATCH 4/4] ueagle-atm: Adjust three checks for null pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux