compat: backport upstream firmware_class bug through f45f3c1f
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 9 Nov 2010 00:53:11 +0000 (16:53 -0800)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 9 Nov 2010 00:53:11 +0000 (16:53 -0800)
commitaf9fe6fe19c34f57a1f353bd8c2e4d8447edb51e
tree055426006377ccdd625621d3096680452eac1e28
parent4b598d6861c090bb1619cc1fc1dae56cd1541f9d
compat: backport upstream firmware_class bug through f45f3c1f

This backports this patch:

commit f45f3c1f3f616ca1d1e1eb5e7a720ca63cb59550
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Aug 18 17:15:18 2010 +0200

    firmware_class: fix typo in error path

    In the error path, _request_firmware sets
    firmware_p to NULL rather than *firmware_p,
    which leads to passing a freed firmware
    struct to drivers when the firmware file
    cannot be found. Fix this.

    Broken by commit f8a4bd3456b988fc73b2c.

Reported-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
All kernels older than 2.6.33 would be affected by this.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
compat/compat_firmware_class.c