Skip to content

Commit 871e766

Browse files
committed
Merge tag 'tegra-for-6.4-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers
soc/tegra: Changes for v6.4-rc1 This contains minor fixes and cleanups. Note that one of the patches here includes ARM firmware changes, but I picked that up after checking with Sudeep and Rob because it didn't seem worth splitting it up any further. * tag 'tegra-for-6.4-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: Use of_property_present() for testing DT property presence firmware: tegra: bpmp: Fix error paths in debugfs Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 547d67a + 8c47b82 commit 871e766

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

drivers/firmware/arm_scmi/optee.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ static int setup_static_shmem(struct device *dev, struct scmi_chan_info *cinfo,
403403
static int setup_shmem(struct device *dev, struct scmi_chan_info *cinfo,
404404
struct scmi_optee_channel *channel)
405405
{
406-
if (of_find_property(cinfo->dev->of_node, "shmem", NULL))
406+
if (of_property_present(cinfo->dev->of_node, "shmem"))
407407
return setup_static_shmem(dev, cinfo, channel);
408408
else
409409
return setup_dynamic_shmem(dev, channel);

drivers/firmware/tegra/bpmp-debugfs.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static int mrq_debug_read(struct tegra_bpmp *bpmp, const char *name,
193193
},
194194
};
195195
u32 fd = 0, len = 0;
196-
int remaining, err;
196+
int remaining, err, close_err;
197197

198198
mutex_lock(&bpmp_debug_lock);
199199
err = mrq_debug_open(bpmp, name, &fd, &len, 0);
@@ -231,7 +231,9 @@ static int mrq_debug_read(struct tegra_bpmp *bpmp, const char *name,
231231
*nbytes = len;
232232

233233
close:
234-
err = mrq_debug_close(bpmp, fd);
234+
close_err = mrq_debug_close(bpmp, fd);
235+
if (!err)
236+
err = close_err;
235237
out:
236238
mutex_unlock(&bpmp_debug_lock);
237239
return err;
@@ -319,7 +321,7 @@ static int bpmp_debug_show(struct seq_file *m, void *p)
319321
},
320322
};
321323
u32 fd = 0, len = 0;
322-
int remaining, err;
324+
int remaining, err, close_err;
323325

324326
filename = get_filename(bpmp, file, fnamebuf, sizeof(fnamebuf));
325327
if (!filename)
@@ -353,7 +355,9 @@ static int bpmp_debug_show(struct seq_file *m, void *p)
353355
}
354356

355357
close:
356-
err = mrq_debug_close(bpmp, fd);
358+
close_err = mrq_debug_close(bpmp, fd);
359+
if (!err)
360+
err = close_err;
357361
out:
358362
mutex_unlock(&bpmp_debug_lock);
359363
return err;

drivers/firmware/tegra/bpmp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,19 +764,19 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
764764
if (err < 0)
765765
goto free_mrq;
766766

767-
if (of_find_property(pdev->dev.of_node, "#clock-cells", NULL)) {
767+
if (of_property_present(pdev->dev.of_node, "#clock-cells")) {
768768
err = tegra_bpmp_init_clocks(bpmp);
769769
if (err < 0)
770770
goto free_mrq;
771771
}
772772

773-
if (of_find_property(pdev->dev.of_node, "#reset-cells", NULL)) {
773+
if (of_property_present(pdev->dev.of_node, "#reset-cells")) {
774774
err = tegra_bpmp_init_resets(bpmp);
775775
if (err < 0)
776776
goto free_mrq;
777777
}
778778

779-
if (of_find_property(pdev->dev.of_node, "#power-domain-cells", NULL)) {
779+
if (of_property_present(pdev->dev.of_node, "#power-domain-cells")) {
780780
err = tegra_bpmp_init_powergates(bpmp);
781781
if (err < 0)
782782
goto free_mrq;

0 commit comments

Comments
 (0)