Message ID | 20200503120847.13528-1-aishwaryarj100@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | i2c: uniphier: Remove superfluous error message in uniphier_i2c_probe() | expand |
On Sun, May 03, 2020 at 05:38:47PM +0530, Aishwarya Ramakrishnan wrote: > The function platform_get_irq can log an error by itself. > This omit a redundant message for exception handling in the > calling function. > > Suggested by Coccinelle. > > Signed-off-by: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com> Please send only one patch for the whole I2C subsystem.
On Sun, May 3, 2020 at 10:29 PM Wolfram Sang <wsa@kernel.org> wrote: > > On Sun, May 03, 2020 at 05:38:47PM +0530, Aishwarya Ramakrishnan wrote: > > The function platform_get_irq can log an error by itself. > > This omit a redundant message for exception handling in the > > calling function. > > > > Suggested by Coccinelle. > > > > Signed-off-by: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com> > > Please send only one patch for the whole I2C subsystem. > Yeah, and then please add my ack to v2. Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
diff --git a/drivers/i2c/busses/i2c-uniphier.c b/drivers/i2c/busses/i2c-uniphier.c index 668b1fa2b0ef..ee00a44bf4c7 100644 --- a/drivers/i2c/busses/i2c-uniphier.c +++ b/drivers/i2c/busses/i2c-uniphier.c @@ -324,10 +324,8 @@ static int uniphier_i2c_probe(struct platform_device *pdev) return PTR_ERR(priv->membase); irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(dev, "failed to get IRQ number\n"); + if (irq < 0) return irq; - } if (of_property_read_u32(dev->of_node, "clock-frequency", &bus_speed)) bus_speed = I2C_MAX_STANDARD_MODE_FREQ;
The function platform_get_irq can log an error by itself. This omit a redundant message for exception handling in the calling function. Suggested by Coccinelle. Signed-off-by: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com> --- drivers/i2c/busses/i2c-uniphier.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)