[media] mt9m111: fix Oops - initialise context before dereferencing
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 12 Mar 2013 11:40:37 +0000 (08:40 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Mar 2013 17:19:03 +0000 (14:19 -0300)
commit4a1313c447ffb67125802d20653959ac46b0b4ef
tree4aedfedf5e1a62f4a7ffad2fba416153fe21d322
parentcbaa5c54cb73897ed6c2544a60ed52aa3215b0f6
[media] mt9m111: fix Oops - initialise context before dereferencing

A recent commit "[media] soc-camera: Push probe-time power management to
drivers" causes an Oops during mt9m111 driver probing because its .ctx
private data field is now dereferenced before it is initialised. Fix this
by initialising the field earlier.

Reported-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/i2c/soc_camera/mt9m111.c