Re: [PATCH 2/9] media: platform: Add c3 mipi csi2 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/09/2024 08:57, Keke Li via B4 Relay wrote:
> From: Keke Li <keke.li@xxxxxxxxxxx>
> 
> This driver is used to receive mipi data from image sensor.
> 
> Signed-off-by: Keke Li <keke.li@xxxxxxxxxxx>


...

> +static int c3_mipi_csi_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct csi_device *csi;
> +	int ret;
> +
> +	csi = devm_kzalloc(dev, sizeof(*csi), GFP_KERNEL);
> +	if (!csi)
> +		return -ENOMEM;
> +
> +	csi->info = of_device_get_match_data(dev);
> +	csi->dev = dev;
> +
> +	ret = c3_mipi_csi_ioremap_resource(csi);
> +	if (ret) {
> +		dev_err(dev, "Failed to ioremap resource: %d\n", ret);
> +		return ret;
> +	}
> +
> +	ret = c3_mipi_csi_configure_clocks(csi);
> +	if (ret) {
> +		dev_err(dev, "Failed to configure clocks: %d\n", ret);
> +		return ret;

Syntax is return dev_err_probe. This was repeated multiple times, so
please organize some inside-Amlogic sessions so you will learn from
somebody's mistakes/reviews. That's way other developers do not repeat
the same issue.


Best regards,
Krzysztof





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux