Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebe37e47 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm_serial_hs: Fix return value handling from platform_get_irq_by_name"

parents 3dd79d86 8ab7a055
Loading
Loading
Loading
Loading
+10 −16
Original line number Diff line number Diff line
@@ -3109,32 +3109,31 @@ static int msm_hs_probe(struct platform_device *pdev)
	if (is_blsp_uart(msm_uport)) {
		core_resource = platform_get_resource_byname(pdev,
					IORESOURCE_MEM, "core_mem");
		bam_resource = platform_get_resource_byname(pdev,
					IORESOURCE_MEM, "bam_mem");
		core_irqres = platform_get_irq_byname(pdev, "core_irq");
		bam_irqres = platform_get_irq_byname(pdev, "bam_irq");
		wakeup_irqres = platform_get_irq_byname(pdev, "wakeup_irq");

		if (!core_resource) {
			MSM_HS_ERR("Invalid core HSUART Resources.\n");
			return -ENXIO;
		}

		bam_resource = platform_get_resource_byname(pdev,
					IORESOURCE_MEM, "bam_mem");
		if (!bam_resource) {
			MSM_HS_ERR("Invalid BAM HSUART Resources.\n");
			return -ENXIO;
		}

		if (!core_irqres) {
		core_irqres = platform_get_irq_byname(pdev, "core_irq");
		if (core_irqres < 0) {
			MSM_HS_ERR("Invalid core irqres Resources.\n");
			return -ENXIO;
		}
		if (!bam_irqres) {
		bam_irqres = platform_get_irq_byname(pdev, "bam_irq");
		if (bam_irqres < 0) {
			MSM_HS_ERR("Invalid bam irqres Resources.\n");
			return -ENXIO;
		}
		if (!wakeup_irqres)
		wakeup_irqres = platform_get_irq_byname(pdev, "wakeup_irq");
		if (wakeup_irqres < 0) {
			wakeup_irqres = -1;
			MSM_HS_DBG("Wakeup irq not specified.\n");
		}

		uport->mapbase = core_resource->start;

@@ -3198,11 +3197,6 @@ static int msm_hs_probe(struct platform_device *pdev)
		msm_uport->wakeup.inject_rx = pdata->inject_rx_on_wakeup;
		msm_uport->wakeup.rx_to_inject = pdata->rx_to_inject;

		if (unlikely(msm_uport->wakeup.irq < 0)) {
			ret = -ENXIO;
			goto deregister_bus_client;
		}

		if (is_blsp_uart(msm_uport)) {
			msm_uport->bam_tx_ep_pipe_index =
					pdata->bam_tx_ep_pipe_index;