From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 919953195F9 for ; Thu, 26 Mar 2026 07:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774509606; cv=none; b=AIgWrUy78n/YfRJn6cbV8nuJUvr9BMJ3ScaF97Rzp+WOFaVYoXGxwqAktfZqsMS74Fk7GDyTXEYSA8nqzMqmQm+i0L577j/Cep+T5kqzaE0+IgaeJeajcPnB1WQxdO2mSob+iLDCLlwB3G3ZjIne4p8KGLIDQHlD0H+tsxznzXw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774509606; c=relaxed/simple; bh=ExW1NIEHB+EiDlJzqanGe6xzLPWNW5fnfdAHXlZNKZs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZwBxKAJvGCNtOhX41XZ0H0zMx7Nrl6s+A/ARfFst04TMenIkB1HSuUellUlFw6qCY5XhWt0N0kW6/7Pz59JUMxY72t7bTqWraLag5PFjH/Pb2BtX86UA+9XB0jMtrBvf8zjMsnuVw0DACgVfebwD5zBk6p1V9+s7j340QdA0Btk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=bSqHsThx; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bSqHsThx" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-486fb14227cso7464905e9.3 for ; Thu, 26 Mar 2026 00:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774509604; x=1775114404; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VHr554UwMya/RBBL/+B8JRf4OCCWjk70NfobapbtEoQ=; b=bSqHsThx5wzVsBaC3UXsa6nVypmTE1x9DepESc2HYbFsv4ZfuZxgYo9LHksbLDar2f sFVojy4ZmgzBG1dr7txzM5XWDx1TP8GQx9dR/Yaxi5S08n0MZidxZ734j/R7n7qG4TYv 3cd5YoW5VAb77NS1lBTOEl91pu3Fhq4nRltZoE3Mqf2O7Qochnaw3n+Lg769mHIfeNWp a+1wHZJjuLPbDVmM0S/YUFwSkRM6eDbZBZiq4KSjU2JQvaev4WiyB9hZcd3oRVBDaXPR kjCHhTWMyy09Q6xBZpXt1QMCNN8s8btT4VprQwQ40vpdGG4COGQgpG2ebXQN+jqbCkfz FK+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774509604; x=1775114404; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VHr554UwMya/RBBL/+B8JRf4OCCWjk70NfobapbtEoQ=; b=rsEGOwrFCSO78PB7RN9N9w2z7cS+clAW+QbwZDOmbNDMgYY4petknj+TUuYnhRW3Fo 29d3bxAiXRZ3QGnc5RWlgI8mBKmaxTF2r0wdnWL0Pds76Whlso2hGJOZFxjXAOlZUG4g OPBEPyhz8wFuCJCzQS1sxmI9k60ahrYAo3bX3ViWsi1D0ioUK87a+NX3cLcVC50JcYhf bT9RDd5nLjAr7/8X/5pQ7L9axH26g/p1qcxRa2CjSk7nQElcdJ7pYZvo1FQu5AHDM8LE j9plsQR5Vn0K+6ypQuSndYXQ8VHoci8spE+1caJyeG6s2sE2E+9DqE+ScW8O86GlBdls yRNg== X-Forwarded-Encrypted: i=1; AJvYcCXJXdeP8QQe24Z+iIT9+ynUpIKLh0x3nL5OlM13h3PNw/iUTdtxJSEW8b811FhwhyPFyFTHI8aU7ptTjp4=@vger.kernel.org X-Gm-Message-State: AOJu0YyB/ePK7trLDK6sd4379LlxEoJZEOlsoQ7kky0q9vCiF6LannVP lh9ZeR+fAVokzOGakCk2gL0RHlD55IEjm7wjmP8OhMWS0eww49lqri/Ty9w0MuxaxQY= X-Gm-Gg: ATEYQzzYe2o2itd+LPOlvGoe6hHLaCjzg9RZOJA8EPOQK70fyhB/zSL1Eu+w8MrOGGC ILr1g16+oyRWQ2GZqWEPe/BdRLdWctb8zrlDF+QzdQf4r5vEtAH4Z4eVxlWtvZPZjMwHtR/a9rg h1VEq1fX9bC+pLgbIjIZymsK7t2eSRoqJCx8PiytaBPGfA4RwASosGlYQshHbtomU8ga7D6Qosc 8FfiPHM9/kMeVNV84q2LoPtymU4kRTOjqRjB9z3CVhOifzMRWgQ8bnGWKXVFTTqOesXMeBO9hw5 sUbpkrHwGCkxfPQUlK4kL8zx3i2IIwIsHl4IFqZ8ngBqUjO0RRbCVbBQrkKVUjG0LLgWbDX6SJL 3ybSY6ZCGUBBBgUNavd4435d6oduThh8M3Yb4qsQk9zJBFBJTQIh3j9DNxgh6eibcQs/RRiC2qP rkE3Qg9xBmoPejXQjPnalba/cIyuo= X-Received: by 2002:a05:600c:1548:b0:486:fba7:b150 with SMTP id 5b1f17b1804b1-48715ff7432mr101933255e9.15.1774509603806; Thu, 26 Mar 2026 00:20:03 -0700 (PDT) Received: from localhost ([41.210.147.106]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48722c9f0afsm19645375e9.10.2026.03.26.00.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2026 00:20:03 -0700 (PDT) Date: Thu, 26 Mar 2026 10:19:58 +0300 From: Dan Carpenter To: Omer Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] staging: rtl8723bs: cleanup return in sdio_init() Message-ID: References: <20260324220453.47406-1-omer.e.idrissi@gmail.com> <20260324220453.47406-3-omer.e.idrissi@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Mar 25, 2026 at 07:51:27PM +0100, Omer wrote: > I will make a v2 patch for this series. > My question is do I go back to returning error pointers for > sdio_dvobj_init? I did that in my original commit so that > the proper errno would be propagated back to the rtw_drv_init probe > function in sdio_intf.c. No, just keep it as return NULL. But the check should be: ret = sdio_init(dvobj); if (ret) { Because that's the standard way to do error handling. It's slightly more readable than the alternatives like: if (sdio_init(dvobj) < 0) { > sdio_dvobj_init function can fail due to both allocation issues and > sdio_init failure. So i thought it would be more > descriptive to propagate an error pointer instead of NULL for both cases. It's more descriptive but returning NULL is fine. Every change you make adds places where people can disagree with you. We want to change from _SUCCESS/_FAIL to standard error codes. Fine everyone agrees with that. But then changing to error pointers? Some people might agree and some might not. And then it's like, okay we have 99 functions which return NULL and 1 function which returns error pointers. And we get into a whole discussion about it. Forget it. Just return NULL. regards, dan carpenter