From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] [media] s5p-mfc: Adjust a null pointer check in four functions
Date: Fri, 8 Sep 2017 22:53:34 +0200 [thread overview]
Message-ID: <e794361b-8f2a-7457-007f-72ef4fa66d02@users.sourceforge.net> (raw)
In-Reply-To: <482a6c92-a85e-0bcd-edf7-3c2f63ea74c5@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 8 Sep 2017 22:37:00 +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/media/platform/s5p-mfc/s5p_mfc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index abfb70b07032..cf68aed59e0d 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -470,7 +470,7 @@ static void s5p_mfc_handle_error(struct s5p_mfc_dev *dev,
{
mfc_err("Interrupt Error: %08x\n", err);
- if (ctx != NULL) {
+ if (ctx) {
/* Error recovery is dependent on the state of context */
switch (ctx->state) {
case MFCINST_RES_CHANGE_INIT:
@@ -508,7 +508,7 @@ static void s5p_mfc_handle_seq_done(struct s5p_mfc_ctx *ctx,
{
struct s5p_mfc_dev *dev;
- if (ctx == NULL)
+ if (!ctx)
return;
dev = ctx->dev;
if (ctx->c_ops->post_seq_start) {
@@ -562,7 +562,7 @@ static void s5p_mfc_handle_init_buffers(struct s5p_mfc_ctx *ctx,
struct s5p_mfc_buf *src_buf;
struct s5p_mfc_dev *dev;
- if (ctx == NULL)
+ if (!ctx)
return;
dev = ctx->dev;
s5p_mfc_hw_call(dev->mfc_ops, clear_int_flags, dev);
@@ -1289,7 +1289,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
return PTR_ERR(dev->regs_base);
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (res == NULL) {
+ if (!res) {
dev_err(&pdev->dev, "failed to get irq resource\n");
return -ENOENT;
}
--
2.14.1
next prev parent reply other threads:[~2017-09-08 20:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 20:50 [PATCH 0/3] S5P MFC: Adjustments for five function implementations SF Markus Elfring
2017-09-08 20:51 ` [PATCH 1/3] [media] s5p-mfc: Delete an error message for a failed memory allocation in s5p_mfc_probe() SF Markus Elfring
[not found] ` <CGME20170911091439epcas1p3f8b62f55cae4255d250b1fe990fbf1ff@epcas1p3.samsung.com>
2017-09-11 9:14 ` Sylwester Nawrocki
2017-09-11 19:34 ` SF Markus Elfring
2017-09-08 20:52 ` [PATCH 2/3] [media] s5p-mfc: Improve a size determination in s5p_mfc_alloc_memdev() SF Markus Elfring
[not found] ` <CGME20170911091700epcas1p1bd85f95a6b776581ad4cd6f3108d09ba@epcas1p1.samsung.com>
2017-09-11 9:16 ` Sylwester Nawrocki
2017-09-08 20:53 ` SF Markus Elfring [this message]
[not found] ` <CGME20170911092134epcas2p1a1b11c056b52d68c3b0e4ea2e1e8f758@epcas2p1.samsung.com>
2017-09-11 9:21 ` [PATCH 3/3] [media] s5p-mfc: Adjust a null pointer check in four functions Sylwester Nawrocki
2017-09-11 19:21 ` SF Markus Elfring
2017-09-12 13:21 ` Sylwester Nawrocki
2017-09-12 15:00 ` SF Markus Elfring
2017-09-12 17:41 ` Sylwester Nawrocki
2017-09-12 20:33 ` SF Markus Elfring
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=e794361b-8f2a-7457-007f-72ef4fa66d02@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).