[PATCH v2 1/1] pwm: sun4i: fix a possible NULL dereference

2016-08-16 Thread LABBE Corentin
of_match_device could return NULL, and so cause a NULL pointer dereference later. For fixing this problem, we use of_device_get_match_data(), this will simplify the code a little by using a standard function for getting the match data. Reported-by: coverity (CID 1324139) Signed-off-by: LABBE Core

Re: [PATCH v2 1/1] pwm: sun4i: fix a possible NULL dereference

2016-08-24 Thread LABBE Corentin
On Mon, Aug 22, 2016 at 08:57:37AM +0200, Maxime Ripard wrote: > Hi, > > On Tue, Aug 16, 2016 at 03:18:06PM +0200, LABBE Corentin wrote: > > of_match_device could return NULL, and so cause a NULL pointer > > dereference later. > > > > For fixing this problem, we use of_device_get_match_data(), th

Re: [PATCH v2 1/1] pwm: sun4i: fix a possible NULL dereference

2016-08-21 Thread Maxime Ripard
Hi, On Tue, Aug 16, 2016 at 03:18:06PM +0200, LABBE Corentin wrote: > of_match_device could return NULL, and so cause a NULL pointer > dereference later. > > For fixing this problem, we use of_device_get_match_data(), this will > simplify the code a little by using a standard function for > getti