* [PATCH 1/4] drivers/hsi/controllers/omap_ssi{,_port}.c: fix failure checks
@ 2014-07-17 13:53 Andrey Utkin
2014-07-17 20:51 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Utkin @ 2014-07-17 13:53 UTC (permalink / raw)
To: linux-kernel, kernel-janitors; +Cc: arnd, carlos.chinea, sre, Andrey Utkin
1.
[linux-3.16-rc5/drivers/hsi/controllers/omap_ssi.c:357]: (style) Checking if
unsigned variable 'gdd_irq' is less than zero.
Source code is
omap_ssi->gdd_irq = platform_get_irq_byname(pd, "gdd_mpu");
if (omap_ssi->gdd_irq < 0) {
2.
[linux-3.16-rc5/drivers/hsi/controllers/omap_ssi_port.c:1017]: (style) Checking
if unsigned variable 'irq' is less than zero.
Source code is
omap_port->irq = platform_get_irq(pd, 0);
if (omap_port->irq < 0) {
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80441
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
drivers/hsi/controllers/omap_ssi.c | 6 +++---
drivers/hsi/controllers/omap_ssi_port.c | 7 ++++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/hsi/controllers/omap_ssi.c b/drivers/hsi/controllers/omap_ssi.c
index 0fc7a7f..232ab73 100644
--- a/drivers/hsi/controllers/omap_ssi.c
+++ b/drivers/hsi/controllers/omap_ssi.c
@@ -353,12 +353,12 @@ static int __init ssi_add_controller(struct hsi_controller *ssi,
err = ssi_get_iomem(pd, "gdd", &omap_ssi->gdd, NULL);
if (err < 0)
goto out_err;
- omap_ssi->gdd_irq = platform_get_irq_byname(pd, "gdd_mpu");
- if (omap_ssi->gdd_irq < 0) {
+ err = platform_get_irq_byname(pd, "gdd_mpu");
+ if (err < 0) {
dev_err(&pd->dev, "GDD IRQ resource missing\n");
- err = omap_ssi->gdd_irq;
goto out_err;
}
+ omap_ssi->gdd_irq = err;
tasklet_init(&omap_ssi->gdd_tasklet, ssi_gdd_tasklet,
(unsigned long)ssi);
err = devm_request_irq(&ssi->device, omap_ssi->gdd_irq, ssi_gdd_isr,
diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c
index 29aea0b..001b868 100644
--- a/drivers/hsi/controllers/omap_ssi_port.c
+++ b/drivers/hsi/controllers/omap_ssi_port.c
@@ -1013,11 +1013,12 @@ static int __init ssi_port_irq(struct hsi_port *port,
struct omap_ssi_port *omap_port = hsi_port_drvdata(port);
int err;
- omap_port->irq = platform_get_irq(pd, 0);
- if (omap_port->irq < 0) {
+ err = platform_get_irq(pd, 0);
+ if (err < 0) {
dev_err(&port->device, "Port IRQ resource missing\n");
- return omap_port->irq;
+ return err;
}
+ omap_port->irq = err;
tasklet_init(&omap_port->pio_tasklet, ssi_pio_tasklet,
(unsigned long)port);
err = devm_request_irq(&port->device, omap_port->irq, ssi_pio_isr,
--
1.8.5.5
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH 1/4] drivers/hsi/controllers/omap_ssi{,_port}.c: fix failure checks
2014-07-17 13:53 [PATCH 1/4] drivers/hsi/controllers/omap_ssi{,_port}.c: fix failure checks Andrey Utkin
@ 2014-07-17 20:51 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2014-07-17 20:51 UTC (permalink / raw)
To: Andrey Utkin; +Cc: linux-kernel, kernel-janitors, arnd, carlos.chinea
[-- Attachment #1: Type: text/plain, Size: 956 bytes --]
Hi,
On Thu, Jul 17, 2014 at 04:53:54PM +0300, Andrey Utkin wrote:
> 1.
>
> [linux-3.16-rc5/drivers/hsi/controllers/omap_ssi.c:357]: (style) Checking if
> unsigned variable 'gdd_irq' is less than zero.
>
> Source code is
>
> omap_ssi->gdd_irq = platform_get_irq_byname(pd, "gdd_mpu");
> if (omap_ssi->gdd_irq < 0) {
>
> 2.
>
> [linux-3.16-rc5/drivers/hsi/controllers/omap_ssi_port.c:1017]: (style) Checking
> if unsigned variable 'irq' is less than zero.
>
> Source code is
>
> omap_port->irq = platform_get_irq(pd, 0);
> if (omap_port->irq < 0) {
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80441
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
applied to my for-next branch:
https://git.kernel.org/cgit/linux/kernel/git/sre/linux-hsi.git/commit/?h=for-next&id=b74d4954ae6a6799f7ee832bc377795ab506f4b1
-- Sebastian
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-17 20:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-17 13:53 [PATCH 1/4] drivers/hsi/controllers/omap_ssi{,_port}.c: fix failure checks Andrey Utkin
2014-07-17 20:51 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®