|
@@ -1118,15 +1118,17 @@ static int
|
|
_request_firmware(const struct firmware **firmware_p, const char *name,
|
|
_request_firmware(const struct firmware **firmware_p, const char *name,
|
|
struct device *device, unsigned int opt_flags)
|
|
struct device *device, unsigned int opt_flags)
|
|
{
|
|
{
|
|
- struct firmware *fw;
|
|
|
|
|
|
+ struct firmware *fw = NULL;
|
|
long timeout;
|
|
long timeout;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
if (!firmware_p)
|
|
if (!firmware_p)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
- if (!name || name[0] == '\0')
|
|
|
|
- return -EINVAL;
|
|
|
|
|
|
+ if (!name || name[0] == '\0') {
|
|
|
|
+ ret = -EINVAL;
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
|
|
ret = _request_firmware_prepare(&fw, name, device);
|
|
ret = _request_firmware_prepare(&fw, name, device);
|
|
if (ret <= 0) /* error or already assigned */
|
|
if (ret <= 0) /* error or already assigned */
|