ACPI battery: non-void init function not returning a value

Bug #1247154 reported by Luis Henriques
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Luis Henriques
Lucid
Fix Released
Medium
Luis Henriques
Precise
Fix Released
Medium
Luis Henriques
Quantal
Fix Released
Medium
Luis Henriques

Bug Description

The drivers/acpi/battery.c init function starts with:

static int __init acpi_battery_init(void)
{
 if (acpi_disabled)
  return;
[ ... ]

This could cause problems because, if ACPI is disabled, the driver init function would return 0 (success) without being initialised.

The following compiler warning is shown when compiling Precise kernel:

/home/henrix/src/precise/ubuntu-precise/drivers/acpi/battery.c: In function 'acpi_battery_init':
/home/henrix/src/precise/ubuntu-precise/drivers/acpi/battery.c:1172:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-56-generic 3.2.0-56.86
ProcVersionSignature: Ubuntu 3.2.0-56.86-generic 3.2.51
Uname: Linux 3.2.0-56-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: ubuntu 1607 F.... pulseaudio
 /dev/snd/controlC1: ubuntu 1607 F.... pulseaudio
 /dev/snd/controlC0: ubuntu 1607 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfebf0000 irq 45'
   Mixer name : 'Generic 1af4 ID 21'
   Components : 'HDA:1af40021,1af40021,00100101'
   Controls : 1
   Simple ctrls : 1
Card1.Amixer.info:
 Card hw:1 'I82801AAICH'/'Intel 82801AA-ICH with STAC9700,83,84 at irq 11'
   Mixer name : 'SigmaTel STAC9700,83,84'
   Components : 'AC97a:83847600'
   Controls : 8
   Simple ctrls : 12
Card2.Amixer.info:
 Card hw:2 'AudioPCI'/'Ensoniq AudioPCI ENS1370 at 0xc400, irq 10'
   Mixer name : 'Asahi Kasei AK4531'
   Components : 'AK4531'
   Controls : 43
   Simple ctrls : 15
Date: Fri Nov 1 15:15:26 2013
HibernationDevice: RESUME=UUID=fb857da5-f276-48a8-a960-9e268be368ca
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64+mac (20120823.1)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
MachineType: Bochs Bochs
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 EFI VGA
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-56-generic root=UUID=4aa0ea77-9f66-4074-a28f-6f808346c7a6 ro console=ttyS0
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-56-generic N/A
 linux-backports-modules-3.2.0-56-generic N/A
 linux-firmware 1.79.7
RfKill:

SourcePackage: linux
StagingDrivers: zram
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/01/2011
dmi.bios.vendor: Bochs
dmi.bios.version: Bochs
dmi.chassis.type: 1
dmi.chassis.vendor: Bochs
dmi.modalias: dmi:bvnBochs:bvrBochs:bd01/01/2011:svnBochs:pnBochs:pvr:cvnBochs:ct1:cvr:
dmi.product.name: Bochs
dmi.sys.vendor: Bochs

Revision history for this message
Luis Henriques (henrix) wrote :
Changed in linux (Ubuntu Precise):
assignee: nobody → Luis Henriques (henrix)
status: New → Triaged
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Luis Henriques (henrix)
Changed in linux (Ubuntu Lucid):
status: New → Triaged
Changed in linux (Ubuntu Quantal):
status: New → Triaged
assignee: nobody → Luis Henriques (henrix)
Changed in linux (Ubuntu Lucid):
assignee: nobody → Luis Henriques (henrix)
Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu Lucid):
importance: Undecided → Medium
Changed in linux (Ubuntu Precise):
importance: Undecided → Medium
Changed in linux (Ubuntu Quantal):
importance: Undecided → Medium
tags: added: patch
Luis Henriques (henrix)
Changed in linux (Ubuntu):
status: Confirmed → Fix Committed
Changed in linux (Ubuntu Lucid):
status: Triaged → Fix Committed
Changed in linux (Ubuntu Precise):
status: Triaged → Fix Committed
Changed in linux (Ubuntu Quantal):
status: Triaged → Fix Committed
Revision history for this message
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lucid' to 'verification-done-lucid'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-lucid
tags: added: verification-needed-precise
Revision history for this message
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-precise' to 'verification-done-precise'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-quantal
Revision history for this message
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-quantal' to 'verification-done-quantal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

Revision history for this message
Luis Henriques (henrix) wrote :

Kernels in -proposed for Lucid (2.6.32-54.116), Precise (3.2.0-57.87) and Quantal (3.5.0-44.67) don't show the compilation warning anymore. Tagging all as verified.

tags: added: verification-done-lucid verification-done-precise verification-done-quantal
removed: verification-needed-lucid verification-needed-precise verification-needed-quantal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.32-54.116

---------------
linux (2.6.32-54.116) lucid; urgency=low

  [Steve Conklin]

  * Release Tracking Bug
    - LP: #1250592

  [ Luis Henriques ]

  * SAUCE: ACPI battery: fix compiler warning
    - LP: #1247154

  [ Upstream Kernel Changes ]

  * KVM: unmap pages from the iommu when slots are removed
    - LP: #987569
    - CVE-2012-2121
  * uml: check length in exitcode_proc_write()
    - LP: #1249271
    - CVE-2013-4512
 -- Steve Conklin <email address hidden> Tue, 12 Nov 2013 12:09:35 -0600

Changed in linux (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.1 KiB)

This bug was fixed in the package linux - 3.5.0-44.67

---------------
linux (3.5.0-44.67) quantal; urgency=low

  [Brad Figg]

  * Release Tracking Bug
    - LP: #1250577

  [ Luis Henriques ]

  * SAUCE: ACPI battery: fix compiler warning
    - LP: #1247154

  [ Upstream Kernel Changes ]

  * ACPI / IPMI: Fix atomic context requirement of ipmi_msg_handler()
    - LP: #1249023
  * Btrfs: change how we queue blocks for backref checking
    - LP: #1249023
  * watchdog: ts72xx_wdt: locking bug in ioctl
    - LP: #1249023
  * random: run random_int_secret_init() run after all late_initcalls
    - LP: #1249023
  * tile: use a more conservative __my_cpu_offset in CONFIG_PREEMPT
    - LP: #1249023
  * ALSA: snd-usb-usx2y: remove bogus frame checks
    - LP: #1249023
  * ALSA: hda - Add fixup for ASUS N56VZ
    - LP: #1249023
  * hwmon: (applesmc) Always read until end of data
    - LP: #1249023
  * drm/radeon: fix hw contexts for SUMO2 asics
    - LP: #1249023
  * KVM: PPC: Book3S HV: Fix typo in saving DSCR
    - LP: #1249023
  * random: allow architectures to optionally define random_get_entropy()
    - LP: #1249023
  * ext4: fix memory leak in xattr
    - LP: #1249023
  * parisc: fix interruption handler to respect pagefault_disable()
    - LP: #1249023
  * mm, show_mem: suppress page counts in non-blockable contexts
    - LP: #1249023
  * mm/mmap: check for RLIMIT_AS before unmapping
    - LP: #1249023
  * mm: do not grow the stack vma just because of an overrun on preceding
    vma
    - LP: #1249023
  * xhci: quirk for extra long delay for S4
    - LP: #1249023
  * xhci: Fix spurious wakeups after S5 on Haswell
    - LP: #1249023
  * USB: support new huawei devices in option.c
    - LP: #1249023
  * USB: serial: ti_usb_3410_5052: add Abbott strip port ID to combined
    table as well.
    - LP: #1249023
  * USB: serial: option: add support for Inovia SEW858 device
    - LP: #1249023
  * ARM: 7851/1: check for number of arguments in
    syscall_get/set_arguments()
    - LP: #1249023
  * USB: quirks.c: add one device that cannot deal with suspension
    - LP: #1249023
  * dm snapshot: fix data corruption
    - LP: #1249023
    - CVE-2013-4299
  * USB: quirks: add touchscreen that is dazzeled by remote wakeup
    - LP: #1249023
  * usb: serial: option: blacklist Olivetti Olicard200
    - LP: #1249023
  * usb-storage: add quirk for mandatory READ_CAPACITY_16
    - LP: #1249023
  * writeback: fix negative bdi max pause
    - LP: #1249023
  * powerpc/pseries/lparcfg: Fix possible overflow are more than 1026
    - LP: #1249023
  * powerpc: Restore registers on error exit from
    csum_partial_copy_generic()
    - LP: #1249023
  * nilfs2: fix issue with race condition of competition between segments
    for dirty blocks
    - LP: #1249023
  * fuse: hotfix truncate_pagecache() issue
    - LP: #1249023
  * rt2800: fix wrong TX power compensation
    - LP: #1249023
  * [media] sh_vou: almost forever loop in sh_vou_try_fmt_vid_out()
    - LP: #1249023
  * tcp: must unclone packets before mangling them
    - LP: #1249023
  * tcp: do not forget FIN in tcp_shifted_skb()
    - LP: #1249023
  * net: do not call sock_put() on TIMEWAIT sockets
    - LP: #124902...

Read more...

Changed in linux (Ubuntu Quantal):
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (12.2 KiB)

This bug was fixed in the package linux - 3.2.0-57.87

---------------
linux (3.2.0-57.87) precise; urgency=low

  [Steve Conklin]

  * Release Tracking Bug
    - LP: #1250622

  [ Andy Whitcroft ]

  * tools -- upgrade to common generic helper
    - LP: #1205284

  [ Kees Cook ]

  * SAUCE: backport ARM seccomp-bpf support
    - LP: #1183616

  [ Luis Henriques ]

  * SAUCE: ACPI battery: fix compiler warning
    - LP: #1247154

  [ Tim Gardner ]

  * [Config] updateconfigs: CONFIG_HAVE_AOUT=n for arm

  [ Upstream Kernel Changes ]

  * Revert "sctp: fix call to SCTP_CMD_PROCESS_SACK in
    sctp_cmd_interpreter()"
    - LP: #1249089
  * xen/blkback: Check device permissions before allowing OP_DISCARD
    - LP: #1091187
    - CVE-2013-2140
  * zram: allow request end to coincide with disksize
    - LP: #1246664
  * ARM: 7373/1: add support for the generic syscall.h interface
    - LP: #1183616
  * ARM: 7577/1: arch/add syscall_get_arch
    - LP: #1183616
  * htb: fix sign extension bug
    - LP: #1249089
  * net: check net.core.somaxconn sysctl values
    - LP: #1249089
  * fib_trie: remove potential out of bound access
    - LP: #1249089
  * tcp: cubic: fix overflow error in bictcp_update()
    - LP: #1249089
  * tcp: cubic: fix bug in bictcp_acked()
    - LP: #1249089
  * ipv6: don't stop backtracking in fib6_lookup_1 if subtree does not
    match
    - LP: #1249089
  * 8139cp: Add dma_mapping_error checking
    - LP: #1249089
  * tun: signedness bug in tun_get_user()
    - LP: #1249089
  * ipv6: remove max_addresses check from ipv6_create_tempaddr
    - LP: #1249089
  * ipv6: drop packets with multiple fragmentation headers
    - LP: #1249089
  * ipv6: Don't depend on per socket memory for neighbour discovery
    messages
    - LP: #1249089
  * net: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for
    max_delay
    - LP: #1249089
  * ICMPv6: treat dest unreachable codes 5 and 6 as EACCES, not EPROTO
    - LP: #1249089
  * tipc: fix lockdep warning during bearer initialization
    - LP: #1249089
  * HID: hidraw: put old deallocation mechanism in place
    - LP: #1249089
  * HID: hidraw: correctly deallocate memory on device disconnect
    - LP: #1249089
  * xen-gnt: prevent adding duplicate gnt callbacks
    - LP: #1249089
  * ath9k: always clear ps filter bit on new assoc
    - LP: #1249089
  * libceph: unregister request in __map_request failed and nofail == false
    - LP: #1249089
  * usb: config->desc.bLength may not exceed amount of data returned by the
    device
    - LP: #1249089
  * USB: cdc-wdm: fix race between interrupt handler and tasklet
    - LP: #1249089
  * powerpc: Handle unaligned ldbrx/stdbrx
    - LP: #1249089
  * intel-iommu: Fix leaks in pagetable freeing
    - LP: #1249089
  * ath9k: fix rx descriptor related race condition
    - LP: #1249089
  * ath9k: avoid accessing MRC registers on single-chain devices
    - LP: #1249089
  * ASoC: wm8960: Fix PLL register writes
    - LP: #1249089
  * rculist: list_first_or_null_rcu() should use list_entry_rcu()
    - LP: #1249089
  * USB: mos7720: use GFP_ATOMIC under spinlock
    - LP: #1249089
  * USB: mos7720: fix big-endian control requests
    - LP: #1249089
  * s...

Changed in linux (Ubuntu Precise):
status: Fix Committed → Fix Released
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.