diff options
author | Stefan Herdler <herdler@nurfuerspam.de> | 2024-04-15 04:24:07 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-04-16 00:02:53 +0200 |
commit | 23aebcf13193396fb76b7bc956c7a46fb64c98a2 (patch) | |
tree | 4aee1044a96311d1bab0e59cd2b5dbbfca4b758d /drivers/media/pci/ttpci | |
parent | f126e8a44a033f206ade1db20b050508373d9864 (diff) | |
download | linux-23aebcf13193396fb76b7bc956c7a46fb64c98a2.tar.gz linux-23aebcf13193396fb76b7bc956c7a46fb64c98a2.tar.bz2 linux-23aebcf13193396fb76b7bc956c7a46fb64c98a2.zip |
media: ttpci: coding style fixes: assign_in_if
This patch fixes the following checkpatch errors:
ERROR:ASSIGN_IN_IF: do not use assignment in if condition
Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/pci/ttpci')
-rw-r--r-- | drivers/media/pci/ttpci/budget-av.c | 14 | ||||
-rw-r--r-- | drivers/media/pci/ttpci/budget-ci.c | 7 | ||||
-rw-r--r-- | drivers/media/pci/ttpci/budget-core.c | 3 |
3 files changed, 15 insertions, 9 deletions
diff --git a/drivers/media/pci/ttpci/budget-av.c b/drivers/media/pci/ttpci/budget-av.c index acac9bae4eda..9549e385a909 100644 --- a/drivers/media/pci/ttpci/budget-av.c +++ b/drivers/media/pci/ttpci/budget-av.c @@ -351,8 +351,9 @@ static int ciintf_init(struct budget_av *budget_av) budget_av->budget.ci_present = 1; budget_av->slot_status = SLOTSTATUS_NONE; - if ((result = dvb_ca_en50221_init(&budget_av->budget.dvb_adapter, - &budget_av->ca, 0, 1)) != 0) { + result = dvb_ca_en50221_init(&budget_av->budget.dvb_adapter, + &budget_av->ca, 0, 1); + if (result != 0) { pr_err("ci initialisation failed\n"); goto error; } @@ -1270,7 +1271,8 @@ static void frontend_init(struct budget_av *budget_av) case SUBID_DVBS2_KNC1_OEM: case SUBID_DVBS2_EASYWATCH: budget_av->reinitialise_demod = 1; - if ((fe = dvb_attach(stb0899_attach, &knc1_dvbs2_config, &budget_av->budget.i2c_adap))) + fe = dvb_attach(stb0899_attach, &knc1_dvbs2_config, &budget_av->budget.i2c_adap); + if (fe) dvb_attach(tda8261_attach, fe, &sd1878c_config, &budget_av->budget.i2c_adap); break; @@ -1435,7 +1437,8 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio dprintk(2, "dev: %p\n", dev); - if (!(budget_av = kzalloc(sizeof(struct budget_av), GFP_KERNEL))) + budget_av = kzalloc(sizeof(struct budget_av), GFP_KERNEL); + if (!budget_av) return -ENOMEM; budget_av->has_saa7113 = 0; @@ -1468,7 +1471,8 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio vv_data.vid_ops.vidioc_g_input = vidioc_g_input; vv_data.vid_ops.vidioc_s_input = vidioc_s_input; - if ((err = saa7146_register_device(&budget_av->vd, dev, "knc1", VFL_TYPE_VIDEO))) { + err = saa7146_register_device(&budget_av->vd, dev, "knc1", VFL_TYPE_VIDEO); + if (err) { saa7146_vv_release(dev); ttpci_budget_deinit(&budget_av->budget); kfree(budget_av); diff --git a/drivers/media/pci/ttpci/budget-ci.c b/drivers/media/pci/ttpci/budget-ci.c index 2a51febdb861..062dc14a7340 100644 --- a/drivers/media/pci/ttpci/budget-ci.c +++ b/drivers/media/pci/ttpci/budget-ci.c @@ -481,9 +481,10 @@ static int ciintf_init(struct budget_ci *budget_ci) budget_ci->ca.slot_ts_enable = ciintf_slot_ts_enable; budget_ci->ca.poll_slot_status = ciintf_poll_slot_status; budget_ci->ca.data = budget_ci; - if ((result = dvb_ca_en50221_init(&budget_ci->budget.dvb_adapter, - &budget_ci->ca, - ca_flags, 1)) != 0) { + + result = dvb_ca_en50221_init(&budget_ci->budget.dvb_adapter, + &budget_ci->ca, ca_flags, 1); + if (result != 0) { printk("budget_ci: CI interface detected, but initialisation failed.\n"); goto error; } diff --git a/drivers/media/pci/ttpci/budget-core.c b/drivers/media/pci/ttpci/budget-core.c index 20bcdd26fa16..dc8b2de30799 100644 --- a/drivers/media/pci/ttpci/budget-core.c +++ b/drivers/media/pci/ttpci/budget-core.c @@ -531,7 +531,8 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, if (bi->type != BUDGET_FS_ACTIVY) saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI); - if ((ret = budget_register(budget)) == 0) + ret = budget_register(budget); + if (ret == 0) return 0; /* Everything OK */ /* An error occurred, cleanup resources */ |