Re: [PATCH 1/1] omap3isp: Don't pass uninitialised arguments to of_graph_get_next_endpoint()

2015-04-01 Thread Sakari Ailus
Hi Sebastian,

On Tue, Mar 31, 2015 at 03:37:20AM +0200, Sebastian Reichel wrote:
 Hi,
 
 On Tue, Mar 31, 2015 at 02:13:28AM +0300, Sakari Ailus wrote:
  isp_of_parse_nodes() passed an uninitialised prev argument to
  of_graph_get_next_endpoint(). This is bad, fix it by assigning NULL to it in
  the initialisation.
  
  Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
  Reported-by: Sebastian Reichel s...@kernel.org
  ---
   drivers/media/platform/omap3isp/isp.c |2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/drivers/media/platform/omap3isp/isp.c 
  b/drivers/media/platform/omap3isp/isp.c
  index ff8f633..ff51c4f 100644
  --- a/drivers/media/platform/omap3isp/isp.c
  +++ b/drivers/media/platform/omap3isp/isp.c
  @@ -2338,7 +2338,7 @@ static int isp_of_parse_node(struct device *dev, 
  struct device_node *node,
   static int isp_of_parse_nodes(struct device *dev,
struct v4l2_async_notifier *notifier)
   {
  -   struct device_node *node;
  +   struct device_node *node = NULL;
   
  notifier-subdevs = devm_kcalloc(
  dev, ISP_MAX_SUBDEVS, sizeof(*notifier-subdevs), GFP_KERNEL);
 
 Acked-By: Sebastian Reichel s...@kernel.org
 
 Note, that this actually triggered the following stacktrace for me,
 so you may want to add a Fixes: commitid and the stacktrace to the
 commit message if its not merged with the original commit (relevant
 for people doing git bisect).

Thanks.

Laurent merged the patch with the original one, and will send a new pull
request.

-- 
Regards,

Sakari Ailus
e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] omap3isp: Don't pass uninitialised arguments to of_graph_get_next_endpoint()

2015-03-30 Thread Sebastian Reichel
Hi,

On Tue, Mar 31, 2015 at 02:13:28AM +0300, Sakari Ailus wrote:
 isp_of_parse_nodes() passed an uninitialised prev argument to
 of_graph_get_next_endpoint(). This is bad, fix it by assigning NULL to it in
 the initialisation.
 
 Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
 Reported-by: Sebastian Reichel s...@kernel.org
 ---
  drivers/media/platform/omap3isp/isp.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/media/platform/omap3isp/isp.c 
 b/drivers/media/platform/omap3isp/isp.c
 index ff8f633..ff51c4f 100644
 --- a/drivers/media/platform/omap3isp/isp.c
 +++ b/drivers/media/platform/omap3isp/isp.c
 @@ -2338,7 +2338,7 @@ static int isp_of_parse_node(struct device *dev, struct 
 device_node *node,
  static int isp_of_parse_nodes(struct device *dev,
 struct v4l2_async_notifier *notifier)
  {
 - struct device_node *node;
 + struct device_node *node = NULL;
  
   notifier-subdevs = devm_kcalloc(
   dev, ISP_MAX_SUBDEVS, sizeof(*notifier-subdevs), GFP_KERNEL);

Acked-By: Sebastian Reichel s...@kernel.org

Note, that this actually triggered the following stacktrace for me,
so you may want to add a Fixes: commitid and the stacktrace to the
commit message if its not merged with the original commit (relevant
for people doing git bisect).

[1.587951] pgd = c0004000
[1.590820] [fe17] *pgd=8fef6821, *pte=, *ppte=
[1.597503] Internal error: Oops: 17 [#1] SMP ARM
[1.602478] Modules linked in:
[1.605743] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 
4.0.0-rc1-00019-g258ac6a-dirty #293
[1.614379] Hardware name: Nokia RX-51 board
[1.618896] task: ce0aab80 ti: ce0ac000 task.ti: ce0ac000
[1.624603] PC is at of_get_parent+0x18/0x34
[1.629150] LR is at _raw_spin_lock_irqsave+0x48/0x54
[1.634490] pc : [c05c6034]lr : [c07d5e20]psr: 6193
[1.634490] sp : ce0addc8  ip : c0c0b5a0  fp : c0b91b90
[1.646636] r10: c0b2e598  r9 : ce3804d0  r8 : 
[1.652160] r7 : fdfb  r6 : cfc84c44  r5 : fdfb  r4 : fdfb
[1.659057] r3 : 6193  r2 :   r1 : 95d695d5  r0 : a113
[1.665954] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment 
kernel
[1.673767] Control: 10c5387d  Table: 80004019  DAC: 0015
[1.679870] Process swapper/0 (pid: 1, stack limit = 0xce0ac218)
[1.686218] Stack: (0xce0addc8 to 0xce0ae000)
[1.690826] ddc0:   ce380010 c05c662c ce545810 c041d9e0 
ce380010 ce1f4010
[1.699462] dde0: ce1f4000 c056b024 c07d4254 ce0aab80 0001 c142199c 
c0a547f0 c0085dcc
[1.708129] de00: c0bfeee8 6113 c0bfef0c c07d4254 0002  
ce546c90 ce1f6270
[1.716766] de20: ce1f6270 c01bced0 ce1f6270 c0a547f0 ce1f6270 ce546d50 
 0001
[1.725433] de40: ce1f6270 c0a547f0 ce546c90 c1457f98 ce1f4010 c0c304d4 
fdfb 
[1.734069] de60:  c0b2e598 c0b91b90 c041c6c8 c041c684 c1457f98 
ce1f4010 
[1.742736] de80: c0c304d4 c041ade4  ce1f4010 c0c304d4 ce1f4044 
c0c18730 
[1.751373] dea0: c0b91b98 c041aff4  c0c304d4 c041af60 c041936c 
ce0d7ca4 ce1f7e90
[1.760040] dec0: c0c304d4 ce526740  c041a608 c09f8b88 c0c304d4 
c0bb3eb0 c0c304d4
[1.768676] dee0: c0bb3eb0 ce5458c0 c0b71550 c041b74c  c0bb3eb0 
c0bb3eb0 c0008b64
[1.777343] df00: cfeff246 cfeff241 c082416c c0aed820 0100 c0aede00 
 005e
[1.785980] df20: cfeff241 ce0adf38 0072  cfeff292 c005b040 
c0a6bfb8 cfeff294
[1.794647] df40: 0006 0006  c0ba7c74 c0ba7fa8 0006 
c0c61700 0114
[1.803283] df60: c0c61700 c0b2e598 c0b91b90 c0b2eea0 0006 0006 
c0b2e598 
[1.811920] df80: fffbfdff  c07ca054    
 
[1.820587] dfa0:  c07ca05c  c000e8f0   
 
[1.829223] dfc0:       
 
[1.837890] dfe0:     0013  
 
[1.846557] [c05c6034] (of_get_parent) from [c05c662c] 
(of_graph_get_next_endpoint+0x24/0x118)
[1.856018] [c05c662c] (of_graph_get_next_endpoint) from [c056b024] 
(isp_probe+0x118/0xf58)
[1.865234] [c056b024] (isp_probe) from [c041c6c8] 
(platform_drv_probe+0x44/0xa4)
[1.873535] [c041c6c8] (platform_drv_probe) from [c041ade4] 
(driver_probe_device+0x104/0x23c)
[1.882934] [c041ade4] (driver_probe_device) from [c041aff4] 
(__driver_attach+0x94/0x98)
[1.891876] [c041aff4] (__driver_attach) from [c041936c] 
(bus_for_each_dev+0x6c/0xa0)
[1.900512] [c041936c] (bus_for_each_dev) from [c041a608] 
(bus_add_driver+0x144/0x1f0)
[1.909271] [c041a608] (bus_add_driver) from [c041b74c] 
(driver_register+0x78/0xf8)
[1.917755] [c041b74c] (driver_register) from [c0008b64] 
(do_one_initcall+0x80/0x1dc)
[1.926391] [c0008b64]