summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-07-31 18:12:00 +0930
committerLen Brown <len.brown@intel.com>2009-08-28 15:17:08 -0400
commit14485c57270e8f3de2a25abaf93bae5712c97e9e (patch)
tree4d9a05bc9b88d5722088c1f816af64ba7a47c0c2 /drivers/platform
parent1e384cb0f9a940f2a431d1708f963987e61d71e3 (diff)
downloadop-kernel-dev-14485c57270e8f3de2a25abaf93bae5712c97e9e.zip
op-kernel-dev-14485c57270e8f3de2a25abaf93bae5712c97e9e.tar.gz
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.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 4c8897a..0d42f44 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;
OpenPOWER on IntegriCloud