Re: [mfd] question about potential null pointer dereference

2017-05-24 Thread Gustavo A. R. Silva
Hi guys, Quoting Charles Keepax : On Wed, May 24, 2017 at 08:22:58AM +0100, Lee Jones wrote: On Tue, 23 May 2017, Gustavo A. R. Silva wrote: > The issue here is that there is a potential NULL pointer dereference at line > 37, in case function of_match_device() returns NULL. > > Maybe a patc

Re: [mfd] question about potential null pointer dereference

2017-05-24 Thread Charles Keepax
On Wed, May 24, 2017 at 08:22:58AM +0100, Lee Jones wrote: > On Tue, 23 May 2017, Gustavo A. R. Silva wrote: > > The issue here is that there is a potential NULL pointer dereference at line > > 37, in case function of_match_device() returns NULL. > > > > Maybe a patch like the following could be a

Re: [mfd] question about potential null pointer dereference

2017-05-24 Thread Lee Jones
On Tue, 23 May 2017, Gustavo A. R. Silva wrote: > > Hello everybody, > > While looking into Coverity ID 1408830 I ran into the following piece of > code at drivers/mfd/wm831x-spi.c:26 > > 26static int wm831x_spi_probe(struct spi_device *spi) > 27{ > 28struct wm831x_pdata *pdata = dev

[mfd] question about potential null pointer dereference

2017-05-23 Thread Gustavo A. R. Silva
Hello everybody, While looking into Coverity ID 1408830 I ran into the following piece of code at drivers/mfd/wm831x-spi.c:26 26static int wm831x_spi_probe(struct spi_device *spi) 27{ 28struct wm831x_pdata *pdata = dev_get_platdata(&spi->dev); 29const struct spi_device_id