From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: =?UTF-8?q?Ulrich=20=C3=96lmann?= Date: Mon, 30 Sep 2019 09:26:03 +0200 Message-Id: <20190930072613.17956-4-u.oelmann@pengutronix.de> In-Reply-To: <20190930072613.17956-1-u.oelmann@pengutronix.de> References: <20190930072613.17956-1-u.oelmann@pengutronix.de> MIME-Version: 1.0 Subject: [OSS-Tools] [PATCH dt-utils 03/13] state: Fix lseek error check in state_mtd_peb_read() List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: oss-tools-bounces@pengutronix.de Sender: "OSS-Tools" To: Pengutronix Public Open-Source-Development Cc: =?UTF-8?q?Ulrich=20=C3=96lmann?= VGhpcyBwb3J0cyB0aGUgZm9sbG93aW5nIGJhcmVib3ggY29tbWl0OgoKfCBjb21taXQgOGE2YTlm YmNlY2ZmYWIxYjA3NmVkZmFkOTRkNGYzMmJiMmNjOTQzNQp8IEF1dGhvcjogQW5kcmV5IFNtaXJu b3YgPGFuZHJldy5zbWlybm92QGdtYWlsLmNvbT4KfCBEYXRlOiAgIFdlZCBNYXIgNiAyMzo0OToy MyAyMDE5IC0wODAwCnwKfCAgICAgc3RhdGU6IEZpeCBsc2VlayBlcnJvciBjaGVjayBpbiBzdGF0 ZV9tdGRfcGViX3JlYWQoKQp8CnwgICAgIERvbid0IHVzZSAnaW50JyB0byBzdG9yZSBsc2Vlaygp J3MgcmV0dXJuIHZhbHVlIHRvIGF2b2lkIHByb2JsZW1zIHdpdGgKfCAgICAgbGFyZ2Ugc2VlayBv ZmZzZXRzLiBXaGlsZSBhdCBpdCwgbWFrZSBzdXJlIHRvIHBvcHVsYXRlIHJldHVybiBlcnJvcgp8 ICAgICBjb2RlIGZyb20gJ2Vycm5vJy4KfAp8ICAgICBTaWduZWQtb2ZmLWJ5OiBBbmRyZXkgU21p cm5vdiA8YW5kcm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