kernel-doc: init kernel version
authorJohannes Berg <[email protected]>
Wed, 24 Oct 2007 22:08:48 +0000 (15:08 -0700)
committerSam Ravnborg <[email protected]>
Mon, 28 Jan 2008 22:14:35 +0000 (23:14 +0100)
The kernel-doc script triggers a perl warning when invoked
without KERNELVERSION in the environment, rather make it use
the string "unknown kernel version" instead.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
scripts/kernel-doc

index e4fa8d9568ba6850c513f4465ed00f303863b2ff..8cf528b5e65a5fa9fc2918388431f19949a1c11e 100755 (executable)
@@ -334,7 +334,7 @@ while ($ARGV[0] =~ m/^-(.*)/) {
 
 # get kernel version from env
 sub get_kernel_version() {
-    my $version;
+    my $version = 'unknown kernel version';
 
     if (defined($ENV{'KERNELVERSION'})) {
        $version = $ENV{'KERNELVERSION'};