diff options
author | Julia Lawall <julia@diku.dk> | 2009-07-31 18:12:00 +0930 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-08-28 15:17:08 -0400 |
commit | 14485c57270e8f3de2a25abaf93bae5712c97e9e (patch) | |
tree | 4d9a05bc9b88d5722088c1f816af64ba7a47c0c2 /drivers/platform | |
parent | 1e384cb0f9a940f2a431d1708f963987e61d71e3 (diff) | |
download | linux-14485c57270e8f3de2a25abaf93bae5712c97e9e.tar.gz linux-14485c57270e8f3de2a25abaf93bae5712c97e9e.tar.xz |
fujitsu-laptop: Correct redundant test
device and acpi_driver_data(device) were tested just a few lines above.
A simplified version of the semantic match that finds this problem is as
follows: (http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
expression E;
@@
if (x == NULL || ...) { ... when forall
return ...; }
.. when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
*x == NULL
|
*x != NULL
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/fujitsu-laptop.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 4c8897a84c68..0d42f444a447 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -745,9 +745,6 @@ static int acpi_fujitsu_remove(struct acpi_device *device, int type) fujitsu = acpi_driver_data(device); - if (!device || !acpi_driver_data(device)) - return -EINVAL; - fujitsu->acpi_handle = NULL; return 0; |