Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: i2c: mt9m114: Fix missing error unwind in probe()

Two paths in the probe function return directly instead of jumping to
error handling. Fix them.

Fixes: 24d756e914fc ("media: i2c: Add driver for onsemi MT9M114 camera sensor")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Laurent Pinchart and committed by
Hans Verkuil
ab75641f e2e73ed4

+2 -2
+2 -2
drivers/media/i2c/mt9m114.c
··· 2367 2367 2368 2368 ret = mt9m114_clk_init(sensor); 2369 2369 if (ret) 2370 - return ret; 2370 + goto error_ep_free; 2371 2371 2372 2372 /* 2373 2373 * Identify the sensor. The driver supports runtime PM, but needs to ··· 2378 2378 ret = mt9m114_power_on(sensor); 2379 2379 if (ret < 0) { 2380 2380 dev_err_probe(dev, ret, "Could not power on the device\n"); 2381 - return ret; 2381 + goto error_ep_free; 2382 2382 } 2383 2383 2384 2384 ret = mt9m114_identify(sensor);