Skip to content

Commit 99f9987

Browse files
Chen Jiahaomathieupoirier
authored andcommitted
remoteproc: stm32: Clean up redundant dev_err_probe()
Referring to platform_get_irq()'s definition, the return value has already been checked if ret < 0, and printed via dev_err_probe(). Calling dev_err_probe() one more time outside platform_get_irq() is obviously redundant. Removing outside dev_err_probe() to clean it up. Besides, switch to use platform_get_irq_optional() since the irq is optional here. Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com> Acked-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Link: https://lore.kernel.org/r/20230817083336.404635-1-chenjiahao16@huawei.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent 0bb80ec commit 99f9987

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/remoteproc/stm32_rproc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,9 +712,9 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev,
712712
unsigned int tzen;
713713
int err, irq;
714714

715-
irq = platform_get_irq(pdev, 0);
715+
irq = platform_get_irq_optional(pdev, 0);
716716
if (irq == -EPROBE_DEFER)
717-
return dev_err_probe(dev, irq, "failed to get interrupt\n");
717+
return irq;
718718

719719
if (irq > 0) {
720720
err = devm_request_irq(dev, irq, stm32_rproc_wdg, 0,

0 commit comments

Comments
 (0)