* [PATCH 0/2] delete null dereference
@ 2015-10-17 9:32 Julia Lawall
2015-10-17 9:32 ` [PATCH 2/2] [media] netup_unidvb: " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2015-10-17 9:32 UTC (permalink / raw)
To: netdev; +Cc: kernel-janitors, linux-wireless, linux-kernel, linux-media
These patches delete NULL dereferences, as detected by
scripts/coccinelle/null/deref_null.cocci.
---
drivers/media/pci/netup_unidvb/netup_unidvb_spi.c | 6 ++----
net/nfc/netlink.c | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] [media] netup_unidvb: delete null dereference
2015-10-17 9:32 [PATCH 0/2] delete null dereference Julia Lawall
@ 2015-10-17 9:32 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2015-10-17 9:32 UTC (permalink / raw)
To: Sergey Kozlov
Cc: kernel-janitors, Mauro Carvalho Chehab, linux-media, linux-kernel
The calls to dev_dbg will not work properly when spi is NULL. Just use
pr_debug instead.
Problem found using scripts/coccinelle/null/deref_null.cocci
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
drivers/media/pci/netup_unidvb/netup_unidvb_spi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_spi.c b/drivers/media/pci/netup_unidvb/netup_unidvb_spi.c
index f55b327..026895f 100644
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_spi.c
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_spi.c
@@ -81,8 +81,7 @@ irqreturn_t netup_spi_interrupt(struct netup_spi *spi)
unsigned long flags;
if (!spi) {
- dev_dbg(&spi->master->dev,
- "%s(): SPI not initialized\n", __func__);
+ pr_debug("%s(): SPI not initialized\n", __func__);
return IRQ_NONE;
}
spin_lock_irqsave(&spi->lock, flags);
@@ -235,8 +234,7 @@ void netup_spi_release(struct netup_unidvb_dev *ndev)
struct netup_spi *spi = ndev->spi;
if (!spi) {
- dev_dbg(&spi->master->dev,
- "%s(): SPI not initialized\n", __func__);
+ pr_debug("%s(): SPI not initialized\n", __func__);
return;
}
spin_lock_irqsave(&spi->lock, flags);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-17 9:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-17 9:32 [PATCH 0/2] delete null dereference Julia Lawall
2015-10-17 9:32 ` [PATCH 2/2] [media] netup_unidvb: " Julia Lawall
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).