[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-mips-cvs
Subject:    MIPS: ath79: Fix test for error return of clk_register_fixed_factor().
From:       linux-mips () linux-mips ! org
Date:       2016-08-17 8:09:02
Message-ID: S23992325AbcHQIJFCaaKF/20160817080905Z+1332 () eddie ! linux-mips ! org
[Download RAW message or body]

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Fri Aug 12 08:36:54 2016 +0530
Comitter: Ralf Baechle <ralf@linux-mips.org> Tue Aug 16 15:42:47 2016 +0200
Commit: c452079b1a34c154db313864ef59ce117777abd0
Gitweb: https://git.linux-mips.org/g/ralf/linux/c452079b1a34
Branch: linux-4.7-stable

clk_register_fixed_factor returns an ERR_PTR in case of an error and
should have an IS_ERR check instead of a null check.

The Coccinelle semantic patch used to find this issue is as follows:
@@
expression e;
statement S;
@@

*e = clk_register_fixed_factor(...);
if (!e) S

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: julia.lawall@lip6.fr
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/13894/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
(cherry picked from commit 6d0bb8dbe3ea2cd805ce476bab454302a7d72565)

---

 arch/mips/ath79/clock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic