Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1715957 > unrolled thread
| Started by | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| First post | 2017-08-20 18:30 +0200 |
| Last post | 2017-08-20 21:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ieee802154: ca8210: Fix a potential NULL pointer dereference Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-08-20 18:30 +0200
Re: [PATCH] ieee802154: ca8210: Fix a potential NULL pointer dereference Marcel Holtmann <marcel@holtmann.org> - 2017-08-20 21:00 +0200
| From | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| Date | 2017-08-20 18:30 +0200 |
| Subject | [PATCH] ieee802154: ca8210: Fix a potential NULL pointer dereference |
| Message-ID | <ugBgS-Qz-17@gated-at.bofh.it> |
'spi' is known to be NULL, so we dereference a NULL pointer here.
Use 'pr_crit()' instead of 'dev_crit()' to report the message.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ieee802154/ca8210.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 326243fae7e2..24a1eabbbc9d 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -917,10 +917,7 @@ static int ca8210_spi_transfer(
struct cas_control *cas_ctl;
if (!spi) {
- dev_crit(
- &spi->dev,
- "NULL spi device passed to ca8210_spi_transfer\n"
- );
+ pr_crit("NULL spi device passed to %s\n", __func__);
return -ENODEV;
}
--
2.11.0
[toc] | [next] | [standalone]
| From | Marcel Holtmann <marcel@holtmann.org> |
|---|---|
| Date | 2017-08-20 21:00 +0200 |
| Subject | Re: [PATCH] ieee802154: ca8210: Fix a potential NULL pointer dereference |
| Message-ID | <ugDC2-2cd-13@gated-at.bofh.it> |
| In reply to | #1715957 |
Hi Christophe, > 'spi' is known to be NULL, so we dereference a NULL pointer here. > Use 'pr_crit()' instead of 'dev_crit()' to report the message. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > --- > drivers/net/ieee802154/ca8210.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web