Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1209306
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 7/9] staging: most: use NULL pointer |
| Date | 2015-08-18 17:20 +0200 |
| Message-ID | <pYQQb-1B4-31@gated-at.bofh.it> (permalink) |
| References | <pYQQa-1B4-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
sparse was complaining that an integer is used as NULL pointer. Fix it by using NULL. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> --- drivers/staging/most/hdm-dim2/dim2_hdm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c index 1ba694b..5b0a588 100644 --- a/drivers/staging/most/hdm-dim2/dim2_hdm.c +++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c @@ -238,7 +238,7 @@ static int try_start_dim_transfer(struct hdm_channel *hdm_ch) unsigned long flags; struct dim_ch_state_t st; - BUG_ON(hdm_ch == 0); + BUG_ON(!hdm_ch); BUG_ON(!hdm_ch->is_initialized); spin_lock_irqsave(&dim_lock, flags); @@ -336,7 +336,7 @@ static void service_done_flag(struct dim2_hdm *dev, int ch_idx) unsigned long flags; u8 *data; - BUG_ON(hdm_ch == 0); + BUG_ON(!hdm_ch); BUG_ON(!hdm_ch->is_initialized); spin_lock_irqsave(&dim_lock, flags); @@ -409,7 +409,7 @@ static struct dim_channel **get_active_channels(struct dim2_hdm *dev, if (dev->hch[ch_idx].is_initialized) buffer[idx++] = &dev->hch[ch_idx].ch; } - buffer[idx++] = 0; + buffer[idx++] = NULL; return buffer; } @@ -905,7 +905,7 @@ static int dim2_remove(struct platform_device *pdev) * break link to local platform_device_id struct * to prevent crash by unload platform device module */ - pdev->id_entry = 0; + pdev->id_entry = NULL; return 0; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/9] staging: most: NULL comparison style Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 17:20 +0200
[PATCH 4/9] staging: most: out of memory error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 17:20 +0200
[PATCH 8/9] staging: most: remove unused variable Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 17:20 +0200
[PATCH 9/9] staging: most: fix Makefile Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 17:20 +0200
[PATCH 6/9] staging: most: make functions static Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 17:20 +0200
[PATCH 5/9] staging: most: remove unused functions Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 17:20 +0200
[PATCH 7/9] staging: most: use NULL pointer Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 17:20 +0200
[PATCH 3/9] staging: most: remove multiple blank line Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 17:20 +0200
[PATCH 2/9] staging: most: bool comparison style Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 17:30 +0200
Re: [PATCH 1/9] staging: most: NULL comparison style Fabio Estevam <festevam@gmail.com> - 2015-08-18 18:40 +0200
Re: [PATCH 1/9] staging: most: NULL comparison style Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-19 12:10 +0200
Re: [PATCH 1/9] staging: most: NULL comparison style Frans Klaver <fransklaver@gmail.com> - 2015-08-19 17:00 +0200
csiph-web