From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A97E15665C for ; Sat, 28 Dec 2024 06:26:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735367175; cv=none; b=pLrWR9piBFwSRfMd2l1enjlexxOtSDIExZPZXX0w2Kv3Y5/jbZDQWn5ZPewE8LSc98j8KXp5j8wD1CVhTBFlSq67Jui5flDkyOMue/Mk77NdNLsgBa9/rMnQUcZgS4VVr1eDDZtfQYcQSzM+nkquyfFf0eXE08RgmAn515frUSc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735367175; c=relaxed/simple; bh=lr1AwV+7ytQ+p13PvcJ10i/P67gCpy/yiNxZKQ3zv2E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ni5DO/Mngurrq5oxnRJbGlCRSYvMxwa79X5ESs3Kv+QUCy3r7YTeYR0QtDDv46xwjEB2wG/r1LA+fxbAndTyCLMRNqaqcrQhS7CNW1h8tgftXTtf/cFuJy9tr7AzC9RlV7TiAIsIPLGPqgF5xQyJwAc6z4fFhK7pORgZY+W07JA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RF/7uHht; arc=none smtp.client-ip=209.85.216.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RF/7uHht" Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2ee8ecb721dso1544740a91.3 for ; Fri, 27 Dec 2024 22:26:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735367173; x=1735971973; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jqyLbhN32nQLTtGJ7VORBdyPFF/pEaWIZ7FPx+DyLKc=; b=RF/7uHhteC6M/fKHhfswAxg3Ad9OgUYOM6LfNDwp7yT9Hln70PGwfbtxew1LPOCCmL RFBVz6J/ucNlObYu1qaL53XBksX0tXc/brftORG28SyFSKaGepBxS9XekSAyXt0AWp41 gB98e2kzDOWyj0BeSco+F7yaoC0bDHmZcBZ6XiK374QUun9p+aLwjScIH2qgLUlIqjJF 2fMwjhD7/qeIxeM2vLuo6oXozcKWBnI6z25iNPCqa4zaTNolwxQvG3mh0f7oQbM31VE7 MpdkffY7e4SUIalrI3W0HTz6ZnerM4fLbN3ZNWvzhoT2fQkCLdxMzs5K0/6WGisu99Wh 7ivg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735367173; x=1735971973; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jqyLbhN32nQLTtGJ7VORBdyPFF/pEaWIZ7FPx+DyLKc=; b=VvJzeZg5nj5wLYB8u+V6h4n9Xi1l/R+0aD2ZPrNK38ytu3/SBQYl8fPM7Ms60YR/xd 8njcLzZP+HKwxuktd6nhJX8WzL7zxfzbOz/mfCF96S5d58eQUe/05iiGOTv0x9XBBc9r KVfqYS5KOdW2j9d4VSwtSsF4+awV2jZqP+MIj8vigA213Dn6HESBqXxscLXuk3D6Pz8i 3B8f3i5vdhXego4RVYYtkwANHOvYNF5mpwaGeMXSVGHaVv00Argin05WfysB3ff5+BFg 0ua9DmrjPQvp67bosEPWRTSQZj9C16KnkNgiC6SQTdmzX6wP00YszLWdEt0PlWlmn3b5 6jmg== X-Forwarded-Encrypted: i=1; AJvYcCU7mViaoVa7OmyYOstn9gPquWtusmdz1vEloidDtjTkDD5uLGZRX3uY6TSlszvwbHmt9zxG9XpNWm4fVek=@vger.kernel.org X-Gm-Message-State: AOJu0YyuUnmPepeHKVIuKCLEBqR2pKCfIavgkZ0Wcx7cRmUNryDq5AUZ IMz0h0sYyPgqNQ0EG/54Cxo6gOJg9d4qiBYRB6FOKPxOTr7owrSo X-Gm-Gg: ASbGncv6el5dhYaCmQEtobVN+nx59OOkBU38whdpXHVkpVCEiv42NDNg4Zs4i+6j/PZ inRVGKPv52pJ+OMH9YnYa9Zqr57jNpZIZpWWk1zrK5TYfr6lFuYP187ec8NpHVZLHR2NhblIDRJ YaZQtCz2Gw6jlxxWK553N0iHzv7yxAor7U00K+j2/svJG5LRekkMwhO6w6j4ONbIpmBkzlyuL42 fIlmZS+MoUOLktoGDI+9Rbq7/53AfJdfxP7aPJiQoB/P0bJOyrERAs= X-Google-Smtp-Source: AGHT+IEIE8ByWvqP1tW47xaUPQySLKKN79YMSCGqMjqOaa9ryA4Thj/5iuLHj+xqUYu9x6pwfCtEYQ== X-Received: by 2002:a17:90b:2cc7:b0:2ef:93:154e with SMTP id 98e67ed59e1d1-2f452eac183mr16440875a91.5.1735367172856; Fri, 27 Dec 2024 22:26:12 -0800 (PST) Received: from ice.. ([171.76.83.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f73f6sm144479455ad.222.2024.12.27.22.26.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Dec 2024 22:26:12 -0800 (PST) From: Nihar Chaithanya To: dpenkler@gmail.com, gregkh@linuxfoundation.org Cc: dan.carpenter@linaro.org, skhan@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Nihar Chaithanya Subject: [PATCH v5 12/15] staging: gpib: lpvo_usb: Return error value from gpib_register_driver() Date: Sat, 28 Dec 2024 11:38:00 +0530 Message-Id: <20241228060800.107653-13-niharchaithanya@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228060800.107653-1-niharchaithanya@gmail.com> References: <20241228060800.107653-1-niharchaithanya@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The function gpib_register_driver() can fail and does not return an error value if it fails. Return the error value if gpib_register_driver() fails. Signed-off-by: Nihar Chaithanya --- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c index 796c3a5be545..839e89615214 100644 --- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c @@ -1181,7 +1181,11 @@ static int usb_gpib_init_module(struct usb_interface *interface) return rv; if (!assigned_usb_minors) { - gpib_register_driver(&usb_gpib_interface, THIS_MODULE); + rv = gpib_register_driver(&usb_gpib_interface, THIS_MODULE); + if (rv) { + pr_err("lpvo_usb_gpib: gpib_register_driver failed\n"); + goto exit; + } } else { /* check if minor is already registered - maybe useless, but if * it happens the code is inconsistent somewhere -- 2.34.1