ssb: Fix error routine when fallback SPROM fails
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 5 Nov 2016 19:08:57 +0000 (14:08 -0500)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:03:20 +0000 (14:03 +0200)
commit 8052d7245b6089992343c80b38b14dbbd8354651 upstream.

When there is a CRC error in the SPROM read from the device, the code
attempts to handle a fallback SPROM. When this also fails, the driver
returns zero rather than an error code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/ssb/pci.c

index a8dc95ebf2d605a8a774c6b05b9287dfaa3b7846..7700cef5e177baf963c8e0fc0e82ac138adb32c5 100644 (file)
@@ -846,6 +846,7 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus,
                        if (err) {
                                ssb_warn("WARNING: Using fallback SPROM failed (err %d)\n",
                                         err);
+                               goto out_free;
                        } else {
                                ssb_dbg("Using SPROM revision %d provided by platform\n",
                                        sprom->revision);