From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-usb@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Matthieu Castet <castet.matthieu@free.fr>,
Stanislaw Gruszka <stf_xl@wp.pl>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 4/4] ueagle-atm: Adjust three checks for null pointers
Date: Fri, 19 May 2017 19:51:12 +0200 [thread overview]
Message-ID: <b111dc9c-58c3-bfe0-3c36-6cf090c48cdf@users.sourceforge.net> (raw)
In-Reply-To: <d1c7c5d1-68b8-bbfc-8d0b-71a8e6cdd152@users.sourceforge.net>
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
prev parent reply other threads:[~2017-05-19 17:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 17:45 [PATCH 0/4] ueagle-atm: Adjustments for eight function implementations SF Markus Elfring
2017-05-19 17:47 ` [PATCH 1/4] ueagle-atm: Delete error messages for failed memory allocations in two functions SF Markus Elfring
2017-05-19 17:49 ` [PATCH 2/4] ueagle-atm: Improve a size determination in uea_bind() SF Markus Elfring
2017-05-19 17:50 ` [PATCH 3/4] ueagle-atm: Delete unnecessary return statements in two functions SF Markus Elfring
2017-05-19 17:51 ` SF Markus Elfring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b111dc9c-58c3-bfe0-3c36-6cf090c48cdf@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=castet.matthieu@free.fr \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stf_xl@wp.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®