media: rockchip: vicap fixes error of rk_csirx_irq1_handler

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Iec15d04da87fb82e9bceca25300ebd93547fec45
This commit is contained in:
Zefa Chen
2023-12-26 17:59:51 +08:00
parent 67c83f5d38
commit 73c9b3d6a5

View File

@@ -779,7 +779,7 @@ static irqreturn_t rk_csirx_irq1_handler(int irq, void *ctx)
{
struct device *dev = ctx;
struct csi2_hw *csi2_hw = dev_get_drvdata(dev);
struct csi2_dev *csi2 = csi2_hw->csi2;
struct csi2_dev *csi2 = NULL;
struct csi2_err_stats *err_list = NULL;
unsigned long err_stat = 0;
u32 val;
@@ -788,11 +788,16 @@ static irqreturn_t rk_csirx_irq1_handler(int irq, void *ctx)
char vc_info[CSI_VCINFO_LEN] = {0};
bool is_add_cnt = false;
if (!csi2_hw || !csi2) {
if (!csi2_hw) {
disable_irq_nosync(irq);
return IRQ_HANDLED;
}
csi2 = csi2_hw->csi2;
if (!csi2) {
disable_irq_nosync(irq);
return IRQ_HANDLED;
}
val = read_csihost_reg(csi2_hw->base, CSIHOST_ERR1);
if (val) {
if (val & CSIHOST_ERR1_PHYERR_SPTSYNCHS) {